@inf-monkeys-tech/monkeys 1.0.9 → 1.0.11

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.
@@ -6650,13 +6650,243 @@ var OutputRecordSchema = z2.object({
6650
6650
  createdAt: IsoDateTimeSchema
6651
6651
  }).strict();
6652
6652
 
6653
+ // src/contracts/agent.ts
6654
+ import { z as z3 } from "zod";
6655
+ var AgentModeSchema = z3.enum(["chatbot", "agent"]);
6656
+ var AgentSessionCapabilitySchema = z3.enum([
6657
+ "text",
6658
+ "reasoning",
6659
+ "plan",
6660
+ "tasks",
6661
+ "tools",
6662
+ "mcp",
6663
+ "shell",
6664
+ "fileChange",
6665
+ "skills",
6666
+ "approval",
6667
+ "artifacts",
6668
+ "usage",
6669
+ "resume",
6670
+ "diff",
6671
+ "workspaceFiles",
6672
+ "terminal",
6673
+ "testResults"
6674
+ ]);
6675
+ var AgentSessionCapabilitiesSchema = z3.object({
6676
+ text: z3.boolean().default(true),
6677
+ reasoning: z3.boolean().default(false),
6678
+ plan: z3.boolean().default(false),
6679
+ tasks: z3.boolean().default(false),
6680
+ tools: z3.boolean().default(false),
6681
+ mcp: z3.boolean().default(false),
6682
+ shell: z3.boolean().default(false),
6683
+ fileChange: z3.boolean().default(false),
6684
+ skills: z3.boolean().default(false),
6685
+ approval: z3.boolean().default(false),
6686
+ artifacts: z3.boolean().default(false),
6687
+ usage: z3.boolean().default(false),
6688
+ resume: z3.boolean().default(false),
6689
+ diff: z3.boolean().default(false),
6690
+ workspaceFiles: z3.boolean().default(false),
6691
+ terminal: z3.boolean().default(false),
6692
+ testResults: z3.boolean().default(false)
6693
+ }).strict();
6694
+ var AgentSessionSnapshotSchema = z3.object({
6695
+ mode: AgentModeSchema,
6696
+ modelId: z3.string().trim().min(1),
6697
+ capabilities: AgentSessionCapabilitiesSchema
6698
+ }).strict();
6699
+ var AgentSessionEventHeaderSchema = z3.object({
6700
+ contract: z3.literal("AgentSessionEvent"),
6701
+ eventId: ContractIdentifierSchema,
6702
+ sessionId: ContractIdentifierSchema,
6703
+ sequence: z3.number().int().nonnegative(),
6704
+ idempotencyKey: ContractIdentifierSchema,
6705
+ occurredAt: IsoDateTimeSchema
6706
+ }).strict();
6707
+ var sessionEvent = (eventType, payload) => AgentSessionEventHeaderSchema.extend({
6708
+ eventType: z3.literal(eventType),
6709
+ payload: z3.object(payload).strict()
6710
+ }).strict();
6711
+ var AgentSessionEventSchema = z3.discriminatedUnion("eventType", [
6712
+ sessionEvent("message", {
6713
+ messageId: ContractIdentifierSchema,
6714
+ role: z3.enum(["user", "assistant", "system"]),
6715
+ operation: z3.enum(["append", "replace"]).default("append"),
6716
+ parts: z3.array(JsonValueSchema),
6717
+ status: z3.enum(["streaming", "completed", "failed"]).optional()
6718
+ }),
6719
+ sessionEvent("reasoning", {
6720
+ reasoningId: ContractIdentifierSchema,
6721
+ text: z3.string(),
6722
+ status: z3.enum(["streaming", "completed"])
6723
+ }),
6724
+ sessionEvent("plan", {
6725
+ planId: ContractIdentifierSchema,
6726
+ title: z3.string().optional(),
6727
+ status: z3.enum(["pending", "running", "completed", "failed"]),
6728
+ steps: z3.array(
6729
+ z3.object({
6730
+ id: ContractIdentifierSchema,
6731
+ title: z3.string(),
6732
+ status: z3.enum(["pending", "running", "completed", "failed", "skipped"])
6733
+ }).strict()
6734
+ )
6735
+ }),
6736
+ sessionEvent("task", {
6737
+ taskId: ContractIdentifierSchema,
6738
+ title: z3.string(),
6739
+ status: z3.enum(["pending", "running", "completed", "failed", "skipped"]),
6740
+ detail: z3.string().optional()
6741
+ }),
6742
+ sessionEvent("tool", {
6743
+ toolCallId: ContractIdentifierSchema,
6744
+ toolName: z3.string().trim().min(1),
6745
+ status: z3.enum(["pending", "running", "completed", "failed", "denied"]),
6746
+ input: JsonValueSchema.optional(),
6747
+ output: JsonValueSchema.optional(),
6748
+ error: z3.string().optional(),
6749
+ startedAt: IsoDateTimeSchema.optional(),
6750
+ completedAt: IsoDateTimeSchema.optional()
6751
+ }),
6752
+ sessionEvent("approval", {
6753
+ approvalId: ContractIdentifierSchema,
6754
+ toolCallId: ContractIdentifierSchema.optional(),
6755
+ status: z3.enum(["requested", "approved", "rejected", "expired"]),
6756
+ title: z3.string(),
6757
+ description: z3.string().optional(),
6758
+ requestedAction: JsonValueSchema.optional()
6759
+ }),
6760
+ sessionEvent("status", {
6761
+ status: z3.enum(["queued", "running", "waiting_approval", "stopping", "stopped", "completed", "failed"]),
6762
+ detail: z3.string().optional()
6763
+ }),
6764
+ sessionEvent("artifact", {
6765
+ artifactId: ContractIdentifierSchema,
6766
+ name: z3.string().trim().min(1),
6767
+ kind: z3.enum(["file", "image", "video", "audio", "web", "other"]),
6768
+ status: z3.enum(["pending", "ready", "failed"]),
6769
+ mimeType: z3.string().optional(),
6770
+ url: z3.string().url().optional(),
6771
+ size: z3.number().int().nonnegative().optional(),
6772
+ sourceEventId: ContractIdentifierSchema.optional()
6773
+ }),
6774
+ sessionEvent("usage", {
6775
+ inputTokens: z3.number().int().nonnegative().optional(),
6776
+ outputTokens: z3.number().int().nonnegative().optional(),
6777
+ totalTokens: z3.number().int().nonnegative().optional(),
6778
+ contextTokens: z3.number().int().nonnegative().optional(),
6779
+ contextWindow: z3.number().int().positive().optional()
6780
+ }),
6781
+ sessionEvent("resume", {
6782
+ resumable: z3.boolean(),
6783
+ state: JsonObjectSchema.optional(),
6784
+ reason: z3.string().optional()
6785
+ }),
6786
+ sessionEvent("error", {
6787
+ code: z3.string().trim().min(1),
6788
+ message: z3.string(),
6789
+ retryable: z3.boolean(),
6790
+ sourceEventId: ContractIdentifierSchema.optional(),
6791
+ details: JsonObjectSchema.optional()
6792
+ }),
6793
+ sessionEvent("diff", {
6794
+ path: z3.string().trim().min(1),
6795
+ status: z3.enum(["added", "modified", "deleted", "renamed"]),
6796
+ patch: z3.string().optional()
6797
+ }),
6798
+ sessionEvent("workspace-file", {
6799
+ path: z3.string().trim().min(1),
6800
+ operation: z3.enum(["upsert", "delete"]),
6801
+ mimeType: z3.string().optional(),
6802
+ size: z3.number().int().nonnegative().optional()
6803
+ }),
6804
+ sessionEvent("terminal", {
6805
+ terminalId: ContractIdentifierSchema,
6806
+ stream: z3.enum(["stdin", "stdout", "stderr", "status"]),
6807
+ chunk: z3.string(),
6808
+ exitCode: z3.number().int().optional()
6809
+ }),
6810
+ sessionEvent("test-result", {
6811
+ testId: ContractIdentifierSchema,
6812
+ name: z3.string(),
6813
+ status: z3.enum(["running", "passed", "failed", "skipped"]),
6814
+ durationMs: z3.number().nonnegative().optional(),
6815
+ output: z3.string().optional()
6816
+ })
6817
+ ]);
6818
+ var AgentSessionViewModelSchema = z3.object({
6819
+ contract: z3.literal("AgentSessionViewModel"),
6820
+ sessionId: ContractIdentifierSchema,
6821
+ snapshot: AgentSessionSnapshotSchema,
6822
+ status: z3.enum(["queued", "running", "waiting_approval", "stopping", "stopped", "completed", "failed"]),
6823
+ events: z3.array(AgentSessionEventSchema),
6824
+ lastSequence: z3.number().int().min(-1),
6825
+ resumable: z3.boolean().default(false)
6826
+ }).strict().superRefine((value, context) => {
6827
+ const eventIds = /* @__PURE__ */ new Set();
6828
+ const idempotencyKeys = /* @__PURE__ */ new Set();
6829
+ let previousSequence = -1;
6830
+ value.events.forEach((event, index) => {
6831
+ if (event.sessionId !== value.sessionId) {
6832
+ context.addIssue({
6833
+ code: "custom",
6834
+ path: ["events", index, "sessionId"],
6835
+ message: "Event sessionId must match the view model sessionId."
6836
+ });
6837
+ }
6838
+ if (event.sequence <= previousSequence) {
6839
+ context.addIssue({
6840
+ code: "custom",
6841
+ path: ["events", index, "sequence"],
6842
+ message: "Events must be ordered by a strictly increasing sequence."
6843
+ });
6844
+ }
6845
+ if (eventIds.has(event.eventId)) {
6846
+ context.addIssue({
6847
+ code: "custom",
6848
+ path: ["events", index, "eventId"],
6849
+ message: "Event IDs must be unique within a session view model."
6850
+ });
6851
+ }
6852
+ if (idempotencyKeys.has(event.idempotencyKey)) {
6853
+ context.addIssue({
6854
+ code: "custom",
6855
+ path: ["events", index, "idempotencyKey"],
6856
+ message: "Idempotency keys must be unique within a session view model."
6857
+ });
6858
+ }
6859
+ previousSequence = event.sequence;
6860
+ eventIds.add(event.eventId);
6861
+ idempotencyKeys.add(event.idempotencyKey);
6862
+ });
6863
+ const expectedLastSequence = value.events.length > 0 ? value.events[value.events.length - 1].sequence : -1;
6864
+ if (value.lastSequence !== expectedLastSequence) {
6865
+ context.addIssue({
6866
+ code: "custom",
6867
+ path: ["lastSequence"],
6868
+ message: "lastSequence must match the final event sequence, or -1 when there are no events."
6869
+ });
6870
+ }
6871
+ });
6872
+ var AgentExecutionModeSchema = AgentModeSchema;
6873
+ function normalizeAgentMode(value) {
6874
+ const normalized = String(value ?? "").trim().toLowerCase();
6875
+ if (normalized === "agent" || normalized === "codex") return "agent";
6876
+ if (normalized === "chatbot" || normalized === "vercel-ai" || normalized === "vercel" || normalized === "ai-sdk") {
6877
+ return "chatbot";
6878
+ }
6879
+ return void 0;
6880
+ }
6881
+ var normalizeAgentExecutionMode = normalizeAgentMode;
6882
+
6653
6883
  // src/contracts/capability.ts
6654
- import { z as z4 } from "zod";
6884
+ import { z as z5 } from "zod";
6655
6885
 
6656
6886
  // src/contracts/render.ts
6657
- import { z as z3 } from "zod";
6658
- var ProductContextSchema = z3.enum(["studio", "kernel", "compute"]);
6659
- var RenderNodeStateSchema = z3.enum([
6887
+ import { z as z4 } from "zod";
6888
+ var ProductContextSchema = z4.enum(["studio", "kernel", "compute"]);
6889
+ var RenderNodeStateSchema = z4.enum([
6660
6890
  "idle",
6661
6891
  "loading",
6662
6892
  "empty",
@@ -6665,7 +6895,7 @@ var RenderNodeStateSchema = z3.enum([
6665
6895
  "disabled",
6666
6896
  "selected"
6667
6897
  ]);
6668
- var RenderNodeKindSchema = z3.enum([
6898
+ var RenderNodeKindSchema = z4.enum([
6669
6899
  "shell",
6670
6900
  "page",
6671
6901
  "navigation",
@@ -6677,16 +6907,16 @@ var RenderNodeKindSchema = z3.enum([
6677
6907
  "overlay",
6678
6908
  "professional-provider"
6679
6909
  ]);
6680
- var RenderSurfaceSchema = z3.object({
6681
- frameOwner: z3.enum(["host", "provider", "none"]),
6910
+ var RenderSurfaceSchema = z4.object({
6911
+ frameOwner: z4.enum(["host", "provider", "none"]),
6682
6912
  tone: ContractIdentifierSchema.optional(),
6683
- density: z3.enum(["compact", "default", "comfortable"])
6913
+ density: z4.enum(["compact", "default", "comfortable"])
6684
6914
  }).strict();
6685
- var RenderScrollSchema = z3.object({
6686
- owner: z3.enum(["page", "surface", "provider"]),
6687
- axis: z3.enum(["x", "y", "both", "none"]),
6915
+ var RenderScrollSchema = z4.object({
6916
+ owner: z4.enum(["page", "surface", "provider"]),
6917
+ axis: z4.enum(["x", "y", "both", "none"]),
6688
6918
  restoreKey: ContractIdentifierSchema.optional(),
6689
- virtualizationBoundary: z3.boolean()
6919
+ virtualizationBoundary: z4.boolean()
6690
6920
  }).strict().superRefine((scroll, context) => {
6691
6921
  if (scroll.owner === "provider" && scroll.restoreKey) {
6692
6922
  context.addIssue({
@@ -6703,11 +6933,11 @@ var RenderScrollSchema = z3.object({
6703
6933
  });
6704
6934
  }
6705
6935
  });
6706
- var RenderActivationSchema = z3.object({
6936
+ var RenderActivationSchema = z4.object({
6707
6937
  activationId: ContractIdentifierSchema,
6708
- mode: z3.enum(["navigate", "select", "drawer", "modal", "fullscreen", "inline"]),
6709
- targetPath: z3.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.").optional(),
6710
- history: z3.enum(["push", "replace"]).optional()
6938
+ mode: z4.enum(["navigate", "select", "drawer", "modal", "fullscreen", "inline"]),
6939
+ targetPath: z4.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.").optional(),
6940
+ history: z4.enum(["push", "replace"]).optional()
6711
6941
  }).strict().superRefine((activation, context) => {
6712
6942
  if (activation.mode === "navigate" && !activation.targetPath) {
6713
6943
  context.addIssue({ code: "custom", path: ["targetPath"], message: "Navigate activation requires an application-relative targetPath." });
@@ -6716,19 +6946,19 @@ var RenderActivationSchema = z3.object({
6716
6946
  context.addIssue({ code: "custom", path: ["targetPath"], message: "Only navigate activation may declare targetPath." });
6717
6947
  }
6718
6948
  });
6719
- var RenderLifecycleSchema = z3.object({
6720
- mountPolicy: z3.enum(["always", "when-visible", "when-active"]),
6721
- queryPolicy: z3.enum(["always", "when-visible", "when-active", "manual"]),
6722
- retainOnDeactivate: z3.boolean(),
6723
- deepLink: z3.boolean(),
6724
- focusReturn: z3.boolean()
6949
+ var RenderLifecycleSchema = z4.object({
6950
+ mountPolicy: z4.enum(["always", "when-visible", "when-active"]),
6951
+ queryPolicy: z4.enum(["always", "when-visible", "when-active", "manual"]),
6952
+ retainOnDeactivate: z4.boolean(),
6953
+ deepLink: z4.boolean(),
6954
+ focusReturn: z4.boolean()
6725
6955
  }).strict();
6726
- var RenderLayoutSchema = z3.object({
6727
- mode: z3.enum(["contents", "block", "flex", "grid", "absolute"]),
6728
- direction: z3.enum(["row", "column"]).optional(),
6729
- columns: z3.number().int().positive().optional(),
6730
- align: z3.enum(["start", "center", "end", "stretch"]).optional(),
6731
- justify: z3.enum(["start", "center", "end", "between", "around"]).optional(),
6956
+ var RenderLayoutSchema = z4.object({
6957
+ mode: z4.enum(["contents", "block", "flex", "grid", "absolute"]),
6958
+ direction: z4.enum(["row", "column"]).optional(),
6959
+ columns: z4.number().int().positive().optional(),
6960
+ align: z4.enum(["start", "center", "end", "stretch"]).optional(),
6961
+ justify: z4.enum(["start", "center", "end", "between", "around"]).optional(),
6732
6962
  gapTokenRef: EntityRefSchema.optional()
6733
6963
  }).strict().superRefine((layout, context) => {
6734
6964
  if (layout.direction && layout.mode !== "flex") {
@@ -6741,9 +6971,9 @@ var RenderLayoutSchema = z3.object({
6741
6971
  context.addIssue({ code: "custom", path: ["gapTokenRef", "kind"], message: "gapTokenRef must reference design-token." });
6742
6972
  }
6743
6973
  });
6744
- var RenderResponsiveRuleSchema = z3.object({
6745
- minWidthPx: z3.number().nonnegative().optional(),
6746
- maxWidthPx: z3.number().positive().optional(),
6974
+ var RenderResponsiveRuleSchema = z4.object({
6975
+ minWidthPx: z4.number().nonnegative().optional(),
6976
+ maxWidthPx: z4.number().positive().optional(),
6747
6977
  layout: RenderLayoutSchema
6748
6978
  }).strict().superRefine((rule, context) => {
6749
6979
  if (rule.minWidthPx === void 0 && rule.maxWidthPx === void 0) {
@@ -6781,14 +7011,14 @@ var requirePinnedOwnedRef = (reference, expectedKind, path, context) => {
6781
7011
  });
6782
7012
  }
6783
7013
  };
6784
- var RenderNodeSchema = z3.object({
6785
- contract: z3.literal("RenderNode"),
7014
+ var RenderNodeSchema = z4.object({
7015
+ contract: z4.literal("RenderNode"),
6786
7016
  nodeId: ContractIdentifierSchema,
6787
7017
  kind: RenderNodeKindSchema,
6788
7018
  version: ContractVersionSchema,
6789
7019
  ownerRepo: ContractIdentifierSchema,
6790
7020
  parentNodeId: ContractIdentifierSchema.optional(),
6791
- children: z3.array(ContractIdentifierSchema),
7021
+ children: z4.array(ContractIdentifierSchema),
6792
7022
  slot: ContractIdentifierSchema.optional(),
6793
7023
  pageRef: EntityRefSchema,
6794
7024
  semanticRef: EntityRefSchema.optional(),
@@ -6801,7 +7031,7 @@ var RenderNodeSchema = z3.object({
6801
7031
  activation: RenderActivationSchema,
6802
7032
  lifecycle: RenderLifecycleSchema,
6803
7033
  layout: RenderLayoutSchema,
6804
- responsive: z3.array(RenderResponsiveRuleSchema),
7034
+ responsive: z4.array(RenderResponsiveRuleSchema),
6805
7035
  accessRef: EntityRefSchema.optional(),
6806
7036
  evidenceRef: EntityRefSchema.optional(),
6807
7037
  state: RenderNodeStateSchema,
@@ -6833,39 +7063,39 @@ var RenderNodeSchema = z3.object({
6833
7063
  });
6834
7064
  }
6835
7065
  });
6836
- var RenderTreeSchema = z3.object({
6837
- contract: z3.literal("RenderTree"),
7066
+ var RenderTreeSchema = z4.object({
7067
+ contract: z4.literal("RenderTree"),
6838
7068
  treeId: ContractIdentifierSchema,
6839
7069
  product: ProductContextSchema,
6840
7070
  rootNodeId: ContractIdentifierSchema,
6841
- nodes: z3.array(RenderNodeSchema).min(1)
7071
+ nodes: z4.array(RenderNodeSchema).min(1)
6842
7072
  }).strict();
6843
- var OverlayZIndexLaneSchema = z3.enum([
7073
+ var OverlayZIndexLaneSchema = z4.enum([
6844
7074
  "popover",
6845
7075
  "drawer",
6846
7076
  "modal",
6847
7077
  "fullscreen",
6848
7078
  "system"
6849
7079
  ]);
6850
- var OverlayNodeSchema = z3.object({
6851
- contract: z3.literal("OverlayNode"),
7080
+ var OverlayNodeSchema = z4.object({
7081
+ contract: z4.literal("OverlayNode"),
6852
7082
  overlayId: ContractIdentifierSchema,
6853
7083
  renderNode: RenderNodeSchema,
6854
- presentation: z3.enum(["drawer", "modal", "fullscreen"]),
7084
+ presentation: z4.enum(["drawer", "modal", "fullscreen"]),
6855
7085
  zIndexLane: OverlayZIndexLaneSchema,
6856
- url: z3.object({
7086
+ url: z4.object({
6857
7087
  parameter: ContractIdentifierSchema,
6858
7088
  value: ContractIdentifierSchema,
6859
- openMode: z3.enum(["push", "replace"]),
6860
- closeMode: z3.enum(["back", "replace"])
7089
+ openMode: z4.enum(["push", "replace"]),
7090
+ closeMode: z4.enum(["back", "replace"])
6861
7091
  }).strict(),
6862
- focus: z3.object({
6863
- initial: z3.enum(["first-interactive", "container", "explicit"]),
6864
- trap: z3.boolean()
7092
+ focus: z4.object({
7093
+ initial: z4.enum(["first-interactive", "container", "explicit"]),
7094
+ trap: z4.boolean()
6865
7095
  }).strict(),
6866
- close: z3.object({
6867
- escape: z3.boolean(),
6868
- backdrop: z3.boolean()
7096
+ close: z4.object({
7097
+ escape: z4.boolean(),
7098
+ backdrop: z4.boolean()
6869
7099
  }).strict()
6870
7100
  }).strict().superRefine((value, context) => {
6871
7101
  if (value.renderNode.kind !== "overlay") {
@@ -6904,8 +7134,8 @@ var OverlayNodeSchema = z3.object({
6904
7134
  });
6905
7135
  }
6906
7136
  });
6907
- var ProductPathSchema = z3.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.");
6908
- var ApplicationHandoffEndpointSchema = z3.object({
7137
+ var ProductPathSchema = z4.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative path.");
7138
+ var ApplicationHandoffEndpointSchema = z4.object({
6909
7139
  product: ProductContextSchema,
6910
7140
  pageId: ContractIdentifierSchema,
6911
7141
  viewId: ContractIdentifierSchema.optional(),
@@ -6914,8 +7144,8 @@ var ApplicationHandoffEndpointSchema = z3.object({
6914
7144
  activationId: ContractIdentifierSchema.optional(),
6915
7145
  path: ProductPathSchema
6916
7146
  }).strict();
6917
- var ApplicationHandoffSchema = z3.object({
6918
- contract: z3.literal("ApplicationHandoff"),
7147
+ var ApplicationHandoffSchema = z4.object({
7148
+ contract: z4.literal("ApplicationHandoff"),
6919
7149
  handoffId: ContractIdentifierSchema,
6920
7150
  source: ApplicationHandoffEndpointSchema,
6921
7151
  target: ApplicationHandoffEndpointSchema,
@@ -6931,8 +7161,8 @@ var ApplicationHandoffSchema = z3.object({
6931
7161
  });
6932
7162
  }
6933
7163
  });
6934
- var ViewProviderDescriptorSchema = z3.object({
6935
- contract: z3.literal("ViewProviderDescriptor"),
7164
+ var ViewProviderDescriptorSchema = z4.object({
7165
+ contract: z4.literal("ViewProviderDescriptor"),
6936
7166
  providerId: ContractIdentifierSchema,
6937
7167
  providerVersion: ContractIdentifierSchema,
6938
7168
  ownerRepo: ContractIdentifierSchema,
@@ -6940,22 +7170,22 @@ var ViewProviderDescriptorSchema = z3.object({
6940
7170
  rendererKey: ContractIdentifierSchema,
6941
7171
  renderModelSchemaRef: ContractIdentifierSchema,
6942
7172
  intentSchemaRef: ContractIdentifierSchema.optional(),
6943
- loading: z3.enum(["eager", "lazy", "viewport", "on-activation"]),
6944
- stateOwner: z3.enum(["host", "provider", "external"]),
6945
- supportedPageTypes: z3.array(ContractIdentifierSchema).min(1),
6946
- supportedSurfaces: z3.array(z3.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"])).min(1),
6947
- frameOwner: z3.enum(["host", "provider", "none"]),
6948
- sideEffects: z3.array(z3.enum(["network", "storage", "navigation", "worker", "websocket"])),
7173
+ loading: z4.enum(["eager", "lazy", "viewport", "on-activation"]),
7174
+ stateOwner: z4.enum(["host", "provider", "external"]),
7175
+ supportedPageTypes: z4.array(ContractIdentifierSchema).min(1),
7176
+ supportedSurfaces: z4.array(z4.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"])).min(1),
7177
+ frameOwner: z4.enum(["host", "provider", "none"]),
7178
+ sideEffects: z4.array(z4.enum(["network", "storage", "navigation", "worker", "websocket"])),
6949
7179
  sideEffectAdapterRef: EntityRefSchema.optional(),
6950
- lifecycle: z3.object({
6951
- preserveMount: z3.boolean(),
6952
- preserveScroll: z3.boolean(),
7180
+ lifecycle: z4.object({
7181
+ preserveMount: z4.boolean(),
7182
+ preserveScroll: z4.boolean(),
6953
7183
  focusModel: ContractIdentifierSchema
6954
7184
  }).strict(),
6955
- performance: z3.object({
6956
- lazy: z3.boolean(),
6957
- virtualized: z3.boolean(),
6958
- budgetMs: z3.number().positive().optional()
7185
+ performance: z4.object({
7186
+ lazy: z4.boolean(),
7187
+ virtualized: z4.boolean(),
7188
+ budgetMs: z4.number().positive().optional()
6959
7189
  }).strict(),
6960
7190
  accessRef: EntityRefSchema.optional(),
6961
7191
  evidenceRef: EntityRefSchema.optional()
@@ -6987,54 +7217,54 @@ var ViewProviderDescriptorSchema = z3.object({
6987
7217
  });
6988
7218
 
6989
7219
  // src/contracts/capability.ts
6990
- var ContractPortSchema = z4.object({
7220
+ var ContractPortSchema = z5.object({
6991
7221
  name: ContractIdentifierSchema,
6992
7222
  schemaRef: ContractIdentifierSchema,
6993
- required: z4.boolean().default(false),
6994
- multiple: z4.boolean().default(false),
6995
- description: z4.string().optional()
7223
+ required: z5.boolean().default(false),
7224
+ multiple: z5.boolean().default(false),
7225
+ description: z5.string().optional()
6996
7226
  }).strict();
6997
- var CapabilityProviderBindingSchema = z4.object({
7227
+ var CapabilityProviderBindingSchema = z5.object({
6998
7228
  providerRef: EntityRefSchema,
6999
- productContexts: z4.array(ProductContextSchema).default([]),
7000
- priority: z4.number().int().default(0)
7229
+ productContexts: z5.array(ProductContextSchema).default([]),
7230
+ priority: z5.number().int().default(0)
7001
7231
  }).strict();
7002
- var CapabilityManifestSchema = z4.object({
7003
- contract: z4.literal("CapabilityManifest"),
7232
+ var CapabilityManifestSchema = z5.object({
7233
+ contract: z5.literal("CapabilityManifest"),
7004
7234
  id: ContractIdentifierSchema,
7005
7235
  capabilityVersion: ContractIdentifierSchema,
7006
7236
  ownerRepo: ContractIdentifierSchema,
7007
- kind: z4.enum(["primitive", "composite", "view", "professional-provider", "tool", "workflow"]),
7008
- displayName: z4.string().trim().min(1),
7009
- description: z4.string().optional(),
7010
- ports: z4.object({
7011
- inputs: z4.array(ContractPortSchema).default([]),
7012
- outputs: z4.array(ContractPortSchema).default([])
7237
+ kind: z5.enum(["primitive", "composite", "view", "professional-provider", "tool", "workflow"]),
7238
+ displayName: z5.string().trim().min(1),
7239
+ description: z5.string().optional(),
7240
+ ports: z5.object({
7241
+ inputs: z5.array(ContractPortSchema).default([]),
7242
+ outputs: z5.array(ContractPortSchema).default([])
7013
7243
  }).strict(),
7014
- runtime: z4.object({
7015
- providerBindings: z4.array(CapabilityProviderBindingSchema).min(1),
7016
- loading: z4.enum(["eager", "lazy", "viewport", "on-activation"]),
7244
+ runtime: z5.object({
7245
+ providerBindings: z5.array(CapabilityProviderBindingSchema).min(1),
7246
+ loading: z5.enum(["eager", "lazy", "viewport", "on-activation"]),
7017
7247
  fallbackCapabilityRef: EntityRefSchema.optional(),
7018
- stateOwner: z4.enum(["host", "provider", "external"]),
7248
+ stateOwner: z5.enum(["host", "provider", "external"]),
7019
7249
  stateSchemaRef: ContractIdentifierSchema.optional(),
7020
- sideEffects: z4.array(z4.enum(["network", "storage", "navigation", "worker", "websocket"])).default([])
7250
+ sideEffects: z5.array(z5.enum(["network", "storage", "navigation", "worker", "websocket"])).default([])
7021
7251
  }).strict(),
7022
- placement: z4.object({
7023
- surfaces: z4.array(ContractIdentifierSchema).min(1),
7024
- slots: z4.array(ContractIdentifierSchema).default([]),
7025
- variants: z4.array(ContractIdentifierSchema).default([]),
7026
- tokenRefs: z4.array(ContractIdentifierSchema).default([])
7252
+ placement: z5.object({
7253
+ surfaces: z5.array(ContractIdentifierSchema).min(1),
7254
+ slots: z5.array(ContractIdentifierSchema).default([]),
7255
+ variants: z5.array(ContractIdentifierSchema).default([]),
7256
+ tokenRefs: z5.array(ContractIdentifierSchema).default([])
7027
7257
  }).strict(),
7028
- accessibility: z4.object({
7258
+ accessibility: z5.object({
7029
7259
  keyboardModel: ContractIdentifierSchema,
7030
7260
  focusModel: ContractIdentifierSchema,
7031
7261
  labelContract: ContractIdentifierSchema
7032
7262
  }).strict(),
7033
- observability: z4.object({
7263
+ observability: z5.object({
7034
7264
  eventNamespace: ContractIdentifierSchema,
7035
- metrics: z4.array(ContractIdentifierSchema).default([]),
7036
- evidenceRefs: z4.array(ContractIdentifierSchema).default([]),
7037
- performanceBudgetMs: z4.number().positive().optional()
7265
+ metrics: z5.array(ContractIdentifierSchema).default([]),
7266
+ evidenceRefs: z5.array(ContractIdentifierSchema).default([]),
7267
+ performanceBudgetMs: z5.number().positive().optional()
7038
7268
  }).strict()
7039
7269
  }).strict().superRefine((manifest, context) => {
7040
7270
  const providerIds = /* @__PURE__ */ new Set();
@@ -7056,25 +7286,25 @@ var CapabilityManifestSchema = z4.object({
7056
7286
  }
7057
7287
  });
7058
7288
  });
7059
- var CapabilitySourceTypeSchema = z4.enum([
7289
+ var CapabilitySourceTypeSchema = z5.enum([
7060
7290
  "tool-manifest",
7061
7291
  "plugin-manifest",
7062
7292
  "openapi",
7063
7293
  "workflow",
7064
7294
  "comfyui"
7065
7295
  ]);
7066
- var CapabilityRegistrySourceSchema = z4.object({
7296
+ var CapabilityRegistrySourceSchema = z5.object({
7067
7297
  sourceType: CapabilitySourceTypeSchema,
7068
7298
  sourceId: ContractIdentifierSchema,
7069
7299
  ownerRepo: ContractIdentifierSchema
7070
7300
  }).strict();
7071
- var CapabilityRegistryEntrySchema = z4.object({
7301
+ var CapabilityRegistryEntrySchema = z5.object({
7072
7302
  manifest: CapabilityManifestSchema,
7073
- sources: z4.array(CapabilityRegistrySourceSchema).min(1)
7303
+ sources: z5.array(CapabilityRegistrySourceSchema).min(1)
7074
7304
  }).strict();
7075
- var CapabilityRegistryDocumentSchema = z4.object({
7076
- contract: z4.literal("CapabilityRegistry"),
7077
- entries: z4.array(CapabilityRegistryEntrySchema)
7305
+ var CapabilityRegistryDocumentSchema = z5.object({
7306
+ contract: z5.literal("CapabilityRegistry"),
7307
+ entries: z5.array(CapabilityRegistryEntrySchema)
7078
7308
  }).strict().superRefine((registry, context) => {
7079
7309
  const ids = /* @__PURE__ */ new Set();
7080
7310
  registry.entries.forEach((entry, index) => {
@@ -7090,38 +7320,38 @@ var CapabilityRegistryDocumentSchema = z4.object({
7090
7320
  });
7091
7321
 
7092
7322
  // src/contracts/context.ts
7093
- import { z as z5 } from "zod";
7094
- var ActorRefSchema = z5.object({
7095
- kind: z5.enum(["human", "agent", "service", "tenant", "public"]),
7323
+ import { z as z6 } from "zod";
7324
+ var ActorRefSchema = z6.object({
7325
+ kind: z6.enum(["human", "agent", "service", "tenant", "public"]),
7096
7326
  id: ContractIdentifierSchema.optional(),
7097
7327
  userId: ContractIdentifierSchema.optional(),
7098
7328
  agentId: ContractIdentifierSchema.optional(),
7099
7329
  serviceId: ContractIdentifierSchema.optional()
7100
7330
  }).strict();
7101
- var AuthorityScopeSchema = z5.object({
7331
+ var AuthorityScopeSchema = z6.object({
7102
7332
  resource: ContractIdentifierSchema,
7103
- actions: z5.array(ContractIdentifierSchema).min(1),
7104
- constraints: z5.record(z5.string(), JsonValueSchema).optional()
7333
+ actions: z6.array(ContractIdentifierSchema).min(1),
7334
+ constraints: z6.record(z6.string(), JsonValueSchema).optional()
7105
7335
  }).strict();
7106
- var RequestScopeSchema = z5.object({
7107
- contract: z5.literal("RequestScope"),
7336
+ var RequestScopeSchema = z6.object({
7337
+ contract: z6.literal("RequestScope"),
7108
7338
  requestId: ContractIdentifierSchema,
7109
7339
  traceId: ContractIdentifierSchema.optional(),
7110
7340
  appId: ContractIdentifierSchema,
7111
7341
  tenantId: ContractIdentifierSchema.optional(),
7112
7342
  teamId: ContractIdentifierSchema.optional(),
7113
7343
  actor: ActorRefSchema,
7114
- session: z5.object({
7344
+ session: z6.object({
7115
7345
  authType: ContractIdentifierSchema,
7116
- authenticated: z5.boolean(),
7117
- membershipVerified: z5.boolean()
7346
+ authenticated: z6.boolean(),
7347
+ membershipVerified: z6.boolean()
7118
7348
  }).strict(),
7119
- permissionCodes: z5.array(ContractIdentifierSchema).default([]),
7120
- authority: z5.array(AuthorityScopeSchema).default([]),
7349
+ permissionCodes: z6.array(ContractIdentifierSchema).default([]),
7350
+ authority: z6.array(AuthorityScopeSchema).default([]),
7121
7351
  issuedAt: IsoDateTimeSchema
7122
7352
  }).strict();
7123
- var ExecutionLinkSchema = z5.object({
7124
- contract: z5.literal("ExecutionLink"),
7353
+ var ExecutionLinkSchema = z6.object({
7354
+ contract: z6.literal("ExecutionLink"),
7125
7355
  requestId: ContractIdentifierSchema,
7126
7356
  traceId: ContractIdentifierSchema.optional(),
7127
7357
  correlationId: ContractIdentifierSchema.optional(),
@@ -7131,43 +7361,43 @@ var ExecutionLinkSchema = z5.object({
7131
7361
  taskRef: EntityRefSchema.optional(),
7132
7362
  parentRunRef: EntityRefSchema.optional()
7133
7363
  }).strict();
7134
- var CompletionHeaderSchema = z5.object({
7135
- contract: z5.literal("CompletionHeader"),
7364
+ var CompletionHeaderSchema = z6.object({
7365
+ contract: z6.literal("CompletionHeader"),
7136
7366
  eventId: ContractIdentifierSchema,
7137
7367
  runtimeEventId: ContractIdentifierSchema,
7138
7368
  idempotencyKey: ContractIdentifierSchema,
7139
- sequence: z5.number().int().nonnegative(),
7369
+ sequence: z6.number().int().nonnegative(),
7140
7370
  execution: ExecutionLinkSchema,
7141
- producer: z5.object({
7371
+ producer: z6.object({
7142
7372
  service: ContractIdentifierSchema,
7143
7373
  runtime: ContractIdentifierSchema,
7144
7374
  version: ContractIdentifierSchema
7145
7375
  }).strict(),
7146
- status: z5.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
7376
+ status: z6.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
7147
7377
  occurredAt: IsoDateTimeSchema,
7148
7378
  payloadSchemaRef: ContractIdentifierSchema.optional()
7149
7379
  }).strict();
7150
- var CompletionEventSchema = z5.object({
7380
+ var CompletionEventSchema = z6.object({
7151
7381
  header: CompletionHeaderSchema,
7152
7382
  payload: JsonValueSchema.optional()
7153
7383
  }).strict();
7154
- var AgentRuntimeEventSchema = z5.object({
7155
- contract: z5.literal("AgentRuntimeEvent"),
7384
+ var AgentRuntimeEventSchema = z6.object({
7385
+ contract: z6.literal("AgentRuntimeEvent"),
7156
7386
  runtimeEventId: ContractIdentifierSchema,
7157
7387
  streamId: ContractIdentifierSchema,
7158
- sequence: z5.number().int().nonnegative(),
7388
+ sequence: z6.number().int().nonnegative(),
7159
7389
  requestId: ContractIdentifierSchema,
7160
7390
  teamId: ContractIdentifierSchema,
7161
7391
  threadId: ContractIdentifierSchema.optional(),
7162
- eventType: z5.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert"]),
7392
+ eventType: z6.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert", "session:event"]),
7163
7393
  payload: JsonValueSchema,
7164
7394
  occurredAt: IsoDateTimeSchema
7165
7395
  }).strict();
7166
7396
 
7167
7397
  // src/contracts/continuity.ts
7168
- import { z as z6 } from "zod";
7169
- var DataContinuityEnvelopeSchema = z6.object({
7170
- contract: z6.literal("DataContinuityEnvelope"),
7398
+ import { z as z7 } from "zod";
7399
+ var DataContinuityEnvelopeSchema = z7.object({
7400
+ contract: z7.literal("DataContinuityEnvelope"),
7171
7401
  tenantId: ContractIdentifierSchema,
7172
7402
  teamId: ContractIdentifierSchema,
7173
7403
  sourceRef: EntityRefSchema.optional(),
@@ -7182,104 +7412,104 @@ var DataContinuityEnvelopeSchema = z6.object({
7182
7412
  (value) => Boolean(value.sourceRef || value.bodyRef || value.runRef || value.outputRef || value.artifactRef),
7183
7413
  "At least one continuity ref is required."
7184
7414
  );
7185
- var BodyRelationRecordSchema = z6.object({
7186
- contract: z6.literal("BodyRelationRecord"),
7415
+ var BodyRelationRecordSchema = z7.object({
7416
+ contract: z7.literal("BodyRelationRecord"),
7187
7417
  relationId: ContractIdentifierSchema,
7188
7418
  relationKind: ContractIdentifierSchema,
7189
7419
  subjectRef: EntityRefSchema,
7190
7420
  objectRef: EntityRefSchema,
7191
7421
  ownerRepo: ContractIdentifierSchema,
7192
- authorityScope: z6.enum(["tenant", "team", "global"]),
7422
+ authorityScope: z7.enum(["tenant", "team", "global"]),
7193
7423
  properties: JsonObjectSchema.default({}),
7194
7424
  createdAt: IsoDateTimeSchema,
7195
7425
  updatedAt: IsoDateTimeSchema
7196
7426
  }).strict();
7197
- var ApplicationRunSchema = z6.object({
7198
- contract: z6.literal("ApplicationRun"),
7427
+ var ApplicationRunSchema = z7.object({
7428
+ contract: z7.literal("ApplicationRun"),
7199
7429
  runId: ContractIdentifierSchema,
7200
7430
  definitionRef: EntityRefSchema,
7201
7431
  runtimeLedgerRef: EntityRefSchema,
7202
7432
  requestId: ContractIdentifierSchema,
7203
7433
  actorRef: EntityRefSchema,
7204
- status: z6.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
7205
- inputRefs: z6.array(EntityRefSchema).default([]),
7206
- outputRefs: z6.array(EntityRefSchema).default([]),
7434
+ status: z7.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
7435
+ inputRefs: z7.array(EntityRefSchema).default([]),
7436
+ outputRefs: z7.array(EntityRefSchema).default([]),
7207
7437
  startedAt: IsoDateTimeSchema.optional(),
7208
7438
  completedAt: IsoDateTimeSchema.optional(),
7209
7439
  expiresAt: IsoDateTimeSchema.optional(),
7210
7440
  metadata: JsonObjectSchema.default({})
7211
7441
  }).strict();
7212
- var ExpiringAccessGrantSchema = z6.object({
7213
- contract: z6.literal("ExpiringAccessGrant"),
7442
+ var ExpiringAccessGrantSchema = z7.object({
7443
+ contract: z7.literal("ExpiringAccessGrant"),
7214
7444
  grantId: ContractIdentifierSchema,
7215
7445
  subjectRef: EntityRefSchema,
7216
7446
  resourceRef: EntityRefSchema,
7217
- permissions: z6.array(ContractIdentifierSchema).min(1),
7447
+ permissions: z7.array(ContractIdentifierSchema).min(1),
7218
7448
  issuedAt: IsoDateTimeSchema,
7219
7449
  expiresAt: IsoDateTimeSchema,
7220
7450
  revokedAt: IsoDateTimeSchema.optional()
7221
7451
  }).strict().refine((value) => Date.parse(value.expiresAt) > Date.parse(value.issuedAt), "expiresAt must be after issuedAt");
7222
7452
 
7223
7453
  // src/contracts/data.ts
7224
- import { z as z7 } from "zod";
7225
- var SourceRecordRefSchema = z7.object({
7454
+ import { z as z8 } from "zod";
7455
+ var SourceRecordRefSchema = z8.object({
7226
7456
  sourceId: ContractIdentifierSchema,
7227
7457
  recordId: ContractIdentifierSchema,
7228
- recordVersion: z7.union([z7.number().int().nonnegative(), ContractIdentifierSchema]),
7458
+ recordVersion: z8.union([z8.number().int().nonnegative(), ContractIdentifierSchema]),
7229
7459
  hash: Sha256Schema
7230
7460
  }).strict();
7231
- var OntologyDefinitionSchema = z7.object({
7232
- contract: z7.literal("OntologyDefinition"),
7461
+ var OntologyDefinitionSchema = z8.object({
7462
+ contract: z8.literal("OntologyDefinition"),
7233
7463
  ontologyId: ContractIdentifierSchema,
7234
7464
  dataSpaceId: ContractIdentifierSchema,
7235
7465
  ownerRepo: ContractIdentifierSchema,
7236
7466
  bodySchemaRef: ContractIdentifierSchema,
7237
- authority: z7.object({
7467
+ authority: z8.object({
7238
7468
  service: ContractIdentifierSchema,
7239
7469
  storage: ContractIdentifierSchema,
7240
- scope: z7.enum(["tenant", "team", "user", "global"])
7470
+ scope: z8.enum(["tenant", "team", "user", "global"])
7241
7471
  }).strict(),
7242
- relationKinds: z7.array(ContractIdentifierSchema).default([]),
7243
- metricKinds: z7.array(ContractIdentifierSchema).default([])
7472
+ relationKinds: z8.array(ContractIdentifierSchema).default([]),
7473
+ metricKinds: z8.array(ContractIdentifierSchema).default([])
7244
7474
  }).strict();
7245
- var ProjectionSpecSchema = z7.object({
7246
- contract: z7.literal("ProjectionSpec"),
7475
+ var ProjectionSpecSchema = z8.object({
7476
+ contract: z8.literal("ProjectionSpec"),
7247
7477
  projectionId: ContractIdentifierSchema,
7248
- ontologyIds: z7.array(ContractIdentifierSchema).min(1),
7478
+ ontologyIds: z8.array(ContractIdentifierSchema).min(1),
7249
7479
  outputSchemaRef: ContractIdentifierSchema,
7250
- operator: z7.object({
7251
- kind: z7.enum(["query", "aggregate", "relationship", "search", "custom"]),
7252
- configuration: z7.record(z7.string(), JsonValueSchema).default({})
7480
+ operator: z8.object({
7481
+ kind: z8.enum(["query", "aggregate", "relationship", "search", "custom"]),
7482
+ configuration: z8.record(z8.string(), JsonValueSchema).default({})
7253
7483
  }).strict(),
7254
- materialization: z7.enum(["on-demand", "event-driven", "scheduled"]),
7255
- invalidationEvents: z7.array(ContractIdentifierSchema).default([]),
7256
- rebuildable: z7.literal(true),
7257
- lineagePolicy: z7.object({
7258
- sourceRecords: z7.boolean(),
7259
- bodyVersions: z7.boolean(),
7260
- runRefs: z7.boolean(),
7261
- actorRefs: z7.boolean()
7484
+ materialization: z8.enum(["on-demand", "event-driven", "scheduled"]),
7485
+ invalidationEvents: z8.array(ContractIdentifierSchema).default([]),
7486
+ rebuildable: z8.literal(true),
7487
+ lineagePolicy: z8.object({
7488
+ sourceRecords: z8.boolean(),
7489
+ bodyVersions: z8.boolean(),
7490
+ runRefs: z8.boolean(),
7491
+ actorRefs: z8.boolean()
7262
7492
  }).strict()
7263
7493
  }).strict();
7264
- var LineageRecordSchema = z7.object({
7265
- contract: z7.literal("LineageRecord"),
7494
+ var LineageRecordSchema = z8.object({
7495
+ contract: z8.literal("LineageRecord"),
7266
7496
  lineageId: ContractIdentifierSchema,
7267
7497
  subjectRef: EntityRefSchema,
7268
- sourceRecords: z7.array(SourceRecordRefSchema).default([]),
7269
- bodyRefs: z7.array(EntityRefSchema).default([]),
7270
- runRefs: z7.array(EntityRefSchema).default([]),
7271
- outputRefs: z7.array(EntityRefSchema).default([]),
7272
- artifactRefs: z7.array(EntityRefSchema).default([]),
7273
- actorRefs: z7.array(EntityRefSchema).default([]),
7274
- evidenceRefs: z7.array(EntityRefSchema).default([]),
7498
+ sourceRecords: z8.array(SourceRecordRefSchema).default([]),
7499
+ bodyRefs: z8.array(EntityRefSchema).default([]),
7500
+ runRefs: z8.array(EntityRefSchema).default([]),
7501
+ outputRefs: z8.array(EntityRefSchema).default([]),
7502
+ artifactRefs: z8.array(EntityRefSchema).default([]),
7503
+ actorRefs: z8.array(EntityRefSchema).default([]),
7504
+ evidenceRefs: z8.array(EntityRefSchema).default([]),
7275
7505
  recordedAt: IsoDateTimeSchema
7276
7506
  }).strict();
7277
- var DomainEventSchema = z7.object({
7278
- contract: z7.literal("DomainEvent"),
7507
+ var DomainEventSchema = z8.object({
7508
+ contract: z8.literal("DomainEvent"),
7279
7509
  eventId: ContractIdentifierSchema,
7280
7510
  eventType: ContractIdentifierSchema,
7281
7511
  aggregateRef: EntityRefSchema,
7282
- aggregateVersion: z7.number().int().nonnegative(),
7512
+ aggregateVersion: z8.number().int().nonnegative(),
7283
7513
  requestId: ContractIdentifierSchema,
7284
7514
  actorRef: EntityRefSchema,
7285
7515
  payload: JsonValueSchema,
@@ -7287,8 +7517,8 @@ var DomainEventSchema = z7.object({
7287
7517
  }).strict();
7288
7518
 
7289
7519
  // src/contracts/page.ts
7290
- import { z as z8 } from "zod";
7291
- var PageTypeSchema = z8.enum([
7520
+ import { z as z9 } from "zod";
7521
+ var PageTypeSchema = z9.enum([
7292
7522
  "page",
7293
7523
  "workspace",
7294
7524
  "view",
@@ -7309,14 +7539,14 @@ var PageTypeSchema = z8.enum([
7309
7539
  "global-design-board",
7310
7540
  "iframe"
7311
7541
  ]);
7312
- var PageVisibilitySchema = z8.object({
7313
- authenticated: z8.boolean().default(true),
7314
- permissionAllOf: z8.array(ContractIdentifierSchema).default([]),
7315
- permissionAnyOf: z8.array(ContractIdentifierSchema).default([]),
7316
- featureFlags: z8.array(ContractIdentifierSchema).default([]),
7317
- productContexts: z8.array(z8.enum(["studio", "kernel", "compute"])).min(1)
7542
+ var PageVisibilitySchema = z9.object({
7543
+ authenticated: z9.boolean().default(true),
7544
+ permissionAllOf: z9.array(ContractIdentifierSchema).default([]),
7545
+ permissionAnyOf: z9.array(ContractIdentifierSchema).default([]),
7546
+ featureFlags: z9.array(ContractIdentifierSchema).default([]),
7547
+ productContexts: z9.array(z9.enum(["studio", "kernel", "compute"])).min(1)
7318
7548
  }).strict();
7319
- var PageRoutePathSchema = z8.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
7549
+ var PageRoutePathSchema = z9.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
7320
7550
  var requireCapabilityReference = (reference, path, context) => {
7321
7551
  if (reference.kind !== "capability") {
7322
7552
  context.addIssue({
@@ -7340,50 +7570,50 @@ var requireCapabilityReference = (reference, path, context) => {
7340
7570
  });
7341
7571
  }
7342
7572
  };
7343
- var PageDefinitionSchema = z8.object({
7344
- contract: z8.literal("PageDefinition"),
7573
+ var PageDefinitionSchema = z9.object({
7574
+ contract: z9.literal("PageDefinition"),
7345
7575
  pageId: ContractIdentifierSchema,
7346
7576
  ownerRepo: ContractIdentifierSchema,
7347
7577
  title: LocalizedTextSchema,
7348
7578
  pageType: PageTypeSchema,
7349
- ownership: z8.object({
7579
+ ownership: z9.object({
7350
7580
  teamId: ContractIdentifierSchema.optional(),
7351
7581
  creatorRef: EntityRefSchema.optional(),
7352
7582
  studioId: ContractIdentifierSchema.optional(),
7353
- builtIn: z8.boolean()
7583
+ builtIn: z9.boolean()
7354
7584
  }).strict(),
7355
- record: z8.object({
7356
- createdTimestamp: z8.number().int().nonnegative().optional(),
7357
- updatedTimestamp: z8.number().int().nonnegative().optional(),
7358
- deleted: z8.boolean().default(false)
7585
+ record: z9.object({
7586
+ createdTimestamp: z9.number().int().nonnegative().optional(),
7587
+ updatedTimestamp: z9.number().int().nonnegative().optional(),
7588
+ deleted: z9.boolean().default(false)
7359
7589
  }).strict(),
7360
- surface: z8.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7590
+ surface: z9.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7361
7591
  routeId: ContractIdentifierSchema,
7362
7592
  routePath: PageRoutePathSchema,
7363
7593
  rendererKey: ContractIdentifierSchema,
7364
7594
  capabilityRef: EntityRefSchema,
7365
- capabilityRefs: z8.array(EntityRefSchema).default([]),
7595
+ capabilityRefs: z9.array(EntityRefSchema).default([]),
7366
7596
  workflowRef: EntityRefSchema.optional(),
7367
- binding: z8.object({
7597
+ binding: z9.object({
7368
7598
  sourceRef: ContractIdentifierSchema.optional(),
7369
7599
  ontologyId: ContractIdentifierSchema.optional(),
7370
7600
  projectionRef: ContractIdentifierSchema.optional(),
7371
7601
  stateRef: ContractIdentifierSchema.optional()
7372
7602
  }).strict(),
7373
- access: z8.object({
7374
- actions: z8.array(z8.enum(["read", "write", "execute", "manage-permissions"])).default([])
7603
+ access: z9.object({
7604
+ actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"])).default([])
7375
7605
  }).strict(),
7376
- rendererConfig: z8.object({
7606
+ rendererConfig: z9.object({
7377
7607
  schemaRef: ContractIdentifierSchema,
7378
7608
  value: JsonObjectSchema
7379
7609
  }).strict(),
7380
- navigation: z8.object({
7610
+ navigation: z9.object({
7381
7611
  label: LocalizedTextSchema,
7382
7612
  iconRef: ContractIdentifierSchema.optional(),
7383
7613
  parentPageId: ContractIdentifierSchema.optional(),
7384
- order: z8.number().int().optional(),
7385
- hidden: z8.boolean().default(false),
7386
- pinned: z8.boolean().default(false)
7614
+ order: z9.number().int().optional(),
7615
+ hidden: z9.boolean().default(false),
7616
+ pinned: z9.boolean().default(false)
7387
7617
  }).strict(),
7388
7618
  visibility: PageVisibilitySchema
7389
7619
  }).strict().superRefine((page, context) => {
@@ -7404,8 +7634,8 @@ var PageDefinitionSchema = z8.object({
7404
7634
  });
7405
7635
  if (page.workflowRef && page.workflowRef.kind !== "workflow") context.addIssue({ code: "custom", path: ["workflowRef", "kind"], message: "workflowRef must reference a workflow." });
7406
7636
  });
7407
- var PageRuntimeDescriptorSchema = z8.object({
7408
- contract: z8.literal("PageRuntimeDescriptor"),
7637
+ var PageRuntimeDescriptorSchema = z9.object({
7638
+ contract: z9.literal("PageRuntimeDescriptor"),
7409
7639
  page: PageDefinitionSchema,
7410
7640
  nodeId: ContractIdentifierSchema,
7411
7641
  parentNodeId: ContractIdentifierSchema.optional(),
@@ -7413,54 +7643,54 @@ var PageRuntimeDescriptorSchema = z8.object({
7413
7643
  semanticRef: ContractIdentifierSchema.optional(),
7414
7644
  dataContextRef: ContractIdentifierSchema.optional(),
7415
7645
  providerRef: EntityRefSchema.optional(),
7416
- surface: z8.object({
7646
+ surface: z9.object({
7417
7647
  frameOwner: ContractIdentifierSchema,
7418
7648
  tone: ContractIdentifierSchema.optional(),
7419
- density: z8.enum(["compact", "default", "comfortable"]).default("default")
7649
+ density: z9.enum(["compact", "default", "comfortable"]).default("default")
7420
7650
  }).strict(),
7421
- scroll: z8.object({
7422
- owner: z8.enum(["page", "surface", "provider"]),
7423
- axis: z8.enum(["x", "y", "both", "none"]),
7651
+ scroll: z9.object({
7652
+ owner: z9.enum(["page", "surface", "provider"]),
7653
+ axis: z9.enum(["x", "y", "both", "none"]),
7424
7654
  restoreKey: ContractIdentifierSchema.optional(),
7425
- virtualized: z8.boolean().default(false)
7655
+ virtualized: z9.boolean().default(false)
7426
7656
  }).strict(),
7427
- activation: z8.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
7428
- lifecycle: z8.object({
7429
- mountPolicy: z8.enum(["always", "when-visible", "when-active"]),
7430
- queryPolicy: z8.enum(["always", "when-visible", "when-active", "manual"]),
7431
- deepLink: z8.boolean(),
7432
- focusReturn: z8.boolean()
7657
+ activation: z9.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
7658
+ lifecycle: z9.object({
7659
+ mountPolicy: z9.enum(["always", "when-visible", "when-active"]),
7660
+ queryPolicy: z9.enum(["always", "when-visible", "when-active", "manual"]),
7661
+ deepLink: z9.boolean(),
7662
+ focusReturn: z9.boolean()
7433
7663
  }).strict()
7434
7664
  }).strict();
7435
- var PageRouteProjectionSchema = z8.object({
7665
+ var PageRouteProjectionSchema = z9.object({
7436
7666
  pageId: ContractIdentifierSchema,
7437
7667
  routeId: ContractIdentifierSchema,
7438
7668
  path: PageRoutePathSchema
7439
7669
  }).strict();
7440
- var PageNavigationProjectionSchema = z8.object({
7670
+ var PageNavigationProjectionSchema = z9.object({
7441
7671
  pageId: ContractIdentifierSchema,
7442
7672
  routeId: ContractIdentifierSchema,
7443
7673
  path: PageRoutePathSchema,
7444
7674
  label: LocalizedTextSchema,
7445
7675
  iconRef: ContractIdentifierSchema.optional(),
7446
7676
  parentPageId: ContractIdentifierSchema.optional(),
7447
- order: z8.number().int().optional(),
7448
- pinned: z8.boolean()
7677
+ order: z9.number().int().optional(),
7678
+ pinned: z9.boolean()
7449
7679
  }).strict();
7450
- var PageGuardProjectionSchema = z8.object({
7680
+ var PageGuardProjectionSchema = z9.object({
7451
7681
  pageId: ContractIdentifierSchema,
7452
- authenticated: z8.boolean(),
7453
- permissionAllOf: z8.array(ContractIdentifierSchema),
7454
- permissionAnyOf: z8.array(ContractIdentifierSchema),
7455
- featureFlags: z8.array(ContractIdentifierSchema),
7456
- actions: z8.array(z8.enum(["read", "write", "execute", "manage-permissions"]))
7682
+ authenticated: z9.boolean(),
7683
+ permissionAllOf: z9.array(ContractIdentifierSchema),
7684
+ permissionAnyOf: z9.array(ContractIdentifierSchema),
7685
+ featureFlags: z9.array(ContractIdentifierSchema),
7686
+ actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"]))
7457
7687
  }).strict();
7458
- var PageRendererProjectionSchema = z8.object({
7688
+ var PageRendererProjectionSchema = z9.object({
7459
7689
  pageId: ContractIdentifierSchema,
7460
- surface: z8.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7690
+ surface: z9.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7461
7691
  rendererKey: ContractIdentifierSchema,
7462
7692
  capabilityRef: EntityRefSchema,
7463
- capabilityRefs: z8.array(EntityRefSchema),
7693
+ capabilityRefs: z9.array(EntityRefSchema),
7464
7694
  providerRef: EntityRefSchema,
7465
7695
  binding: PageDefinitionSchema.shape.binding,
7466
7696
  rendererConfig: PageDefinitionSchema.shape.rendererConfig,
@@ -7501,13 +7731,13 @@ var duplicateProjectionIdentity = (values, identity) => {
7501
7731
  }
7502
7732
  return void 0;
7503
7733
  };
7504
- var PageRuntimeProjectionSchema = z8.object({
7505
- contract: z8.literal("PageRuntimeProjection"),
7506
- product: z8.enum(["studio", "kernel", "compute"]),
7507
- routes: z8.array(PageRouteProjectionSchema),
7508
- navigation: z8.array(PageNavigationProjectionSchema),
7509
- guards: z8.array(PageGuardProjectionSchema),
7510
- renderers: z8.array(PageRendererProjectionSchema)
7734
+ var PageRuntimeProjectionSchema = z9.object({
7735
+ contract: z9.literal("PageRuntimeProjection"),
7736
+ product: z9.enum(["studio", "kernel", "compute"]),
7737
+ routes: z9.array(PageRouteProjectionSchema),
7738
+ navigation: z9.array(PageNavigationProjectionSchema),
7739
+ guards: z9.array(PageGuardProjectionSchema),
7740
+ renderers: z9.array(PageRendererProjectionSchema)
7511
7741
  }).strict().superRefine((projection, context) => {
7512
7742
  const tables = [
7513
7743
  ["routes", projection.routes.map((value) => value.pageId)],
@@ -7563,39 +7793,39 @@ var PageRuntimeProjectionSchema = z8.object({
7563
7793
  });
7564
7794
 
7565
7795
  // src/contracts/semantic.ts
7566
- import { z as z9 } from "zod";
7567
- var ConceptRelationshipSchema = z9.object({
7796
+ import { z as z10 } from "zod";
7797
+ var ConceptRelationshipSchema = z10.object({
7568
7798
  kind: ContractIdentifierSchema,
7569
7799
  targetConceptId: ContractIdentifierSchema,
7570
- cardinality: z9.enum(["one", "optional", "many"])
7800
+ cardinality: z10.enum(["one", "optional", "many"])
7571
7801
  }).strict();
7572
- var ConceptDefinitionSchema = z9.object({
7573
- contract: z9.literal("ConceptDefinition"),
7802
+ var ConceptDefinitionSchema = z10.object({
7803
+ contract: z10.literal("ConceptDefinition"),
7574
7804
  conceptId: ContractIdentifierSchema,
7575
7805
  ownerRepo: ContractIdentifierSchema,
7576
- displayName: z9.string().trim().min(1),
7577
- description: z9.string().optional(),
7806
+ displayName: z10.string().trim().min(1),
7807
+ description: z10.string().optional(),
7578
7808
  schemaRef: ContractIdentifierSchema,
7579
7809
  ontologyId: ContractIdentifierSchema.optional(),
7580
- capabilityIds: z9.array(ContractIdentifierSchema).default([]),
7581
- commandNames: z9.array(ContractIdentifierSchema).default([]),
7582
- relationships: z9.array(ConceptRelationshipSchema).default([])
7810
+ capabilityIds: z10.array(ContractIdentifierSchema).default([]),
7811
+ commandNames: z10.array(ContractIdentifierSchema).default([]),
7812
+ relationships: z10.array(ConceptRelationshipSchema).default([])
7583
7813
  }).strict();
7584
- var DomainCommandDefinitionSchema = z9.object({
7585
- contract: z9.literal("DomainCommandDefinition"),
7814
+ var DomainCommandDefinitionSchema = z10.object({
7815
+ contract: z10.literal("DomainCommandDefinition"),
7586
7816
  commandName: ContractIdentifierSchema,
7587
7817
  ownerRepo: ContractIdentifierSchema,
7588
- displayName: z9.string().trim().min(1),
7589
- description: z9.string().optional(),
7590
- targetKinds: z9.array(ContractIdentifierSchema).min(1),
7818
+ displayName: z10.string().trim().min(1),
7819
+ description: z10.string().optional(),
7820
+ targetKinds: z10.array(ContractIdentifierSchema).min(1),
7591
7821
  inputSchemaRef: ContractIdentifierSchema,
7592
7822
  outputSchemaRef: ContractIdentifierSchema.optional(),
7593
- requiredPermissionCodes: z9.array(ContractIdentifierSchema).default([]),
7823
+ requiredPermissionCodes: z10.array(ContractIdentifierSchema).default([]),
7594
7824
  handlerRef: EntityRefSchema,
7595
- sideEffects: z9.array(z9.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
7825
+ sideEffects: z10.array(z10.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
7596
7826
  }).strict();
7597
- var DomainCommandSchema = z9.object({
7598
- contract: z9.literal("DomainCommand"),
7827
+ var DomainCommandSchema = z10.object({
7828
+ contract: z10.literal("DomainCommand"),
7599
7829
  commandId: ContractIdentifierSchema,
7600
7830
  commandName: ContractIdentifierSchema,
7601
7831
  requestId: ContractIdentifierSchema,
@@ -7603,29 +7833,29 @@ var DomainCommandSchema = z9.object({
7603
7833
  idempotencyKey: ContractIdentifierSchema,
7604
7834
  targetRef: EntityRefSchema,
7605
7835
  actorRef: EntityRefSchema,
7606
- source: z9.object({
7607
- product: z9.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
7836
+ source: z10.object({
7837
+ product: z10.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
7608
7838
  pageId: ContractIdentifierSchema.optional(),
7609
7839
  capabilityId: ContractIdentifierSchema.optional()
7610
7840
  }).strict(),
7611
7841
  payload: JsonObjectSchema,
7612
7842
  issuedAt: IsoDateTimeSchema
7613
7843
  }).strict();
7614
- var ProductDeclarationSchema = z9.object({
7615
- contract: z9.literal("ProductDeclaration"),
7844
+ var ProductDeclarationSchema = z10.object({
7845
+ contract: z10.literal("ProductDeclaration"),
7616
7846
  declarationId: ContractIdentifierSchema,
7617
7847
  ownerRepo: ContractIdentifierSchema,
7618
- concepts: z9.array(ConceptDefinitionSchema).default([]),
7619
- ontologies: z9.array(OntologyDefinitionSchema).default([]),
7620
- projections: z9.array(ProjectionSpecSchema).default([]),
7621
- commands: z9.array(DomainCommandDefinitionSchema).default([]),
7622
- capabilities: z9.array(CapabilityManifestSchema).default([]),
7623
- pages: z9.array(PageDefinitionSchema).default([])
7848
+ concepts: z10.array(ConceptDefinitionSchema).default([]),
7849
+ ontologies: z10.array(OntologyDefinitionSchema).default([]),
7850
+ projections: z10.array(ProjectionSpecSchema).default([]),
7851
+ commands: z10.array(DomainCommandDefinitionSchema).default([]),
7852
+ capabilities: z10.array(CapabilityManifestSchema).default([]),
7853
+ pages: z10.array(PageDefinitionSchema).default([])
7624
7854
  }).strict();
7625
- var DeclarationGraphEdgeSchema = z9.object({
7855
+ var DeclarationGraphEdgeSchema = z10.object({
7626
7856
  from: EntityRefSchema,
7627
7857
  to: EntityRefSchema,
7628
- relation: z9.enum([
7858
+ relation: z10.enum([
7629
7859
  "uses-ontology",
7630
7860
  "uses-projection",
7631
7861
  "uses-capability",
@@ -7633,25 +7863,25 @@ var DeclarationGraphEdgeSchema = z9.object({
7633
7863
  "relates-to-concept"
7634
7864
  ])
7635
7865
  }).strict();
7636
- var ChangeImpactSchema = z9.object({
7866
+ var ChangeImpactSchema = z10.object({
7637
7867
  changedRef: EntityRefSchema,
7638
- affectedRefs: z9.array(EntityRefSchema),
7639
- reasons: z9.array(ContractIdentifierSchema).min(1)
7868
+ affectedRefs: z10.array(EntityRefSchema),
7869
+ reasons: z10.array(ContractIdentifierSchema).min(1)
7640
7870
  }).strict();
7641
- var ChangeImpactGraphSchema = z9.object({
7642
- contract: z9.literal("ChangeImpactGraph"),
7871
+ var ChangeImpactGraphSchema = z10.object({
7872
+ contract: z10.literal("ChangeImpactGraph"),
7643
7873
  declarationId: ContractIdentifierSchema,
7644
- nodes: z9.array(EntityRefSchema),
7645
- edges: z9.array(DeclarationGraphEdgeSchema),
7646
- impacts: z9.array(ChangeImpactSchema),
7874
+ nodes: z10.array(EntityRefSchema),
7875
+ edges: z10.array(DeclarationGraphEdgeSchema),
7876
+ impacts: z10.array(ChangeImpactSchema),
7647
7877
  generatedAt: IsoDateTimeSchema
7648
7878
  }).strict();
7649
7879
 
7650
7880
  // src/contracts/tenant.ts
7651
- import { z as z11 } from "zod";
7881
+ import { z as z12 } from "zod";
7652
7882
 
7653
7883
  // src/contracts/theme.ts
7654
- import { z as z10 } from "zod";
7884
+ import { z as z11 } from "zod";
7655
7885
 
7656
7886
  // src/theme-tokens/core.ts
7657
7887
  var import_ajv = __toESM(require_ajv());
@@ -9845,20 +10075,20 @@ var MONKEYS_REQUIRED_THEME_TOKEN_PATHS = Object.freeze({
9845
10075
  });
9846
10076
 
9847
10077
  // src/contracts/theme.ts
9848
- var ThemeTokenTypeSchema = z10.enum(THEME_TOKEN_TYPES);
9849
- var ThemeTokenSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
10078
+ var ThemeTokenTypeSchema = z11.enum(THEME_TOKEN_TYPES);
10079
+ var ThemeTokenSchema = z11.record(z11.string(), z11.unknown()).superRefine((input, context) => {
9850
10080
  const issues = validateThemeTokensDocumentStructure({ token: input });
9851
10081
  for (const issue of issues) {
9852
10082
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
9853
10083
  }
9854
10084
  });
9855
- var ThemeTokenGroupSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
10085
+ var ThemeTokenGroupSchema = z11.record(z11.string(), z11.unknown()).superRefine((input, context) => {
9856
10086
  const issues = validateThemeTokensDocumentStructure(input);
9857
10087
  for (const issue of issues) {
9858
10088
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
9859
10089
  }
9860
10090
  });
9861
- var ThemeTokensSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
10091
+ var ThemeTokensSchema = z11.record(z11.string(), z11.unknown()).superRefine((input, context) => {
9862
10092
  const issues = validateThemeTokensDocument(input);
9863
10093
  for (const issue of issues) {
9864
10094
  context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
@@ -9885,9 +10115,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
9885
10115
  });
9886
10116
 
9887
10117
  // src/contracts/tenant.ts
9888
- var DesignTokenFileSourceSchema = z11.object({
9889
- type: z11.literal("file"),
9890
- path: z11.string().trim().min(1).superRefine((source, context) => {
10118
+ var DesignTokenFileSourceSchema = z12.object({
10119
+ type: z12.literal("file"),
10120
+ path: z12.string().trim().min(1).superRefine((source, context) => {
9891
10121
  if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
9892
10122
  context.addIssue({
9893
10123
  code: "custom",
@@ -9896,9 +10126,9 @@ var DesignTokenFileSourceSchema = z11.object({
9896
10126
  }
9897
10127
  })
9898
10128
  }).strict();
9899
- var DesignTokenUrlSourceSchema = z11.object({
9900
- type: z11.literal("url"),
9901
- url: z11.string().trim().min(1).superRefine((source, context) => {
10129
+ var DesignTokenUrlSourceSchema = z12.object({
10130
+ type: z12.literal("url"),
10131
+ url: z12.string().trim().min(1).superRefine((source, context) => {
9902
10132
  if (!/^https?:\/\//i.test(source)) {
9903
10133
  context.addIssue({
9904
10134
  code: "custom",
@@ -9907,109 +10137,109 @@ var DesignTokenUrlSourceSchema = z11.object({
9907
10137
  }
9908
10138
  })
9909
10139
  }).strict();
9910
- var DesignTokenInlineSourceSchema = z11.object({
9911
- type: z11.literal("inline"),
10140
+ var DesignTokenInlineSourceSchema = z12.object({
10141
+ type: z12.literal("inline"),
9912
10142
  document: ThemeTokensSchema
9913
10143
  }).strict();
9914
- var DesignTokenSourceSchema = z11.discriminatedUnion("type", [
10144
+ var DesignTokenSourceSchema = z12.discriminatedUnion("type", [
9915
10145
  DesignTokenFileSourceSchema,
9916
10146
  DesignTokenUrlSourceSchema,
9917
10147
  DesignTokenInlineSourceSchema
9918
10148
  ]);
9919
- var TenantDesignTokensConfigSchema = z11.object({
10149
+ var TenantDesignTokensConfigSchema = z12.object({
9920
10150
  /** Ordered tenant overrides. The backend always applies the product default first. */
9921
- tokenSources: z11.array(DesignTokenSourceSchema)
10151
+ tokenSources: z12.array(DesignTokenSourceSchema)
9922
10152
  }).strict();
9923
- var TenantAuthBindingSchema = z11.object({
9924
- kind: z11.literal("auth-provider"),
10153
+ var TenantAuthBindingSchema = z12.object({
10154
+ kind: z12.literal("auth-provider"),
9925
10155
  providerId: ContractIdentifierSchema,
9926
10156
  policyRef: ContractIdentifierSchema.optional()
9927
10157
  }).strict();
9928
- var TenantDataBindingSchema = z11.discriminatedUnion("kind", [
9929
- z11.object({
9930
- kind: z11.literal("data-provider"),
10158
+ var TenantDataBindingSchema = z12.discriminatedUnion("kind", [
10159
+ z12.object({
10160
+ kind: z12.literal("data-provider"),
9931
10161
  providerId: ContractIdentifierSchema,
9932
10162
  domainRef: ContractIdentifierSchema.optional()
9933
10163
  }).strict(),
9934
- z11.object({
9935
- kind: z11.literal("projection"),
10164
+ z12.object({
10165
+ kind: z12.literal("projection"),
9936
10166
  projectionRef: ContractIdentifierSchema,
9937
10167
  domainRef: ContractIdentifierSchema.optional()
9938
10168
  }).strict()
9939
10169
  ]);
9940
- var TenantAuthBindingsSchema = z11.record(
10170
+ var TenantAuthBindingsSchema = z12.record(
9941
10171
  ContractIdentifierSchema,
9942
10172
  TenantAuthBindingSchema
9943
10173
  );
9944
- var TenantDataBindingsSchema = z11.record(
10174
+ var TenantDataBindingsSchema = z12.record(
9945
10175
  ContractIdentifierSchema,
9946
10176
  TenantDataBindingSchema
9947
10177
  );
9948
- var AssetVariantsSchema = z11.object({
9949
- light: z11.string().optional(),
9950
- dark: z11.string().optional()
10178
+ var AssetVariantsSchema = z12.object({
10179
+ light: z12.string().optional(),
10180
+ dark: z12.string().optional()
9951
10181
  }).strict();
9952
- var ThemeHeadbarSchema = z11.object({
9953
- theme: z11.enum(["card", "glassy", "ghost"]).optional(),
9954
- navPosition: z11.enum(["left", "center", "right"]).optional(),
9955
- actions: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
9956
- profile: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
9957
- showTeamQuota: z11.boolean().optional()
10182
+ var ThemeHeadbarSchema = z12.object({
10183
+ theme: z12.enum(["card", "glassy", "ghost"]).optional(),
10184
+ navPosition: z12.enum(["left", "center", "right"]).optional(),
10185
+ actions: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
10186
+ profile: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
10187
+ showTeamQuota: z12.boolean().optional()
9958
10188
  }).strict();
9959
- var TenantHeadbarModuleLeafSchema = z11.object({
10189
+ var TenantHeadbarModuleLeafSchema = z12.object({
9960
10190
  id: ContractIdentifierSchema,
9961
- extraInfo: z11.boolean().optional(),
9962
- displayName: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
9963
- visible: z11.boolean().optional(),
9964
- disabled: z11.boolean().optional(),
9965
- icon: z11.string().optional(),
9966
- showQuickSwitcher: z11.boolean().optional(),
9967
- showSidebar: z11.boolean().optional()
10191
+ extraInfo: z12.boolean().optional(),
10192
+ displayName: z12.union([z12.string(), z12.record(LocaleIdentifierSchema, z12.string())]).optional(),
10193
+ visible: z12.boolean().optional(),
10194
+ disabled: z12.boolean().optional(),
10195
+ icon: z12.string().optional(),
10196
+ showQuickSwitcher: z12.boolean().optional(),
10197
+ showSidebar: z12.boolean().optional()
9968
10198
  }).strict();
9969
10199
  var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
9970
- children: z11.array(TenantHeadbarModuleLeafSchema).optional()
10200
+ children: z12.array(TenantHeadbarModuleLeafSchema).optional()
9971
10201
  }).strict();
9972
- var KernelHeadbarSchema = z11.object({
9973
- theme: z11.literal("card").optional(),
9974
- layoutMode: z11.enum(["boxed", "full-bleed"]).optional(),
9975
- heightPx: z11.number().positive().optional(),
9976
- navPosition: z11.enum(["left", "center", "right"]).optional(),
9977
- brandTitle: z11.string().optional(),
9978
- menuRadius: z11.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
10202
+ var KernelHeadbarSchema = z12.object({
10203
+ theme: z12.literal("card").optional(),
10204
+ layoutMode: z12.enum(["boxed", "full-bleed"]).optional(),
10205
+ heightPx: z12.number().positive().optional(),
10206
+ navPosition: z12.enum(["left", "center", "right"]).optional(),
10207
+ brandTitle: z12.string().optional(),
10208
+ menuRadius: z12.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
9979
10209
  }).strict();
9980
- var CustomIconSchema = z11.object({
9981
- color: z11.string().optional(),
9982
- url: z11.string().optional(),
9983
- type: z11.enum(["svg", "image"]).optional(),
9984
- hintTextColor: z11.string().optional()
10210
+ var CustomIconSchema = z12.object({
10211
+ color: z12.string().optional(),
10212
+ url: z12.string().optional(),
10213
+ type: z12.enum(["svg", "image"]).optional(),
10214
+ hintTextColor: z12.string().optional()
9985
10215
  }).strict();
9986
- var WorkbenchCustomerToolSchema = z11.object({
10216
+ var WorkbenchCustomerToolSchema = z12.object({
9987
10217
  id: ContractIdentifierSchema,
9988
- label: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
9989
- fixed: z11.boolean().optional()
10218
+ label: z12.union([z12.string(), z12.record(LocaleIdentifierSchema, z12.string())]).optional(),
10219
+ fixed: z12.boolean().optional()
9990
10220
  }).strict();
9991
- var WorkbenchStudioOverrideSchema = z11.object({
9992
- studioName: z11.string().trim().min(1),
9993
- dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
9994
- existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
9995
- historyColumnsDefault: z11.number().int().min(1).max(6).optional()
10221
+ var WorkbenchStudioOverrideSchema = z12.object({
10222
+ studioName: z12.string().trim().min(1),
10223
+ dropdownToolsDefault: z12.array(ContractIdentifierSchema).optional(),
10224
+ existingToolsDefault: z12.array(ContractIdentifierSchema).optional(),
10225
+ historyColumnsDefault: z12.number().int().min(1).max(6).optional()
9996
10226
  }).strict();
9997
- var TenantWorkbenchPageContextSchema = z11.object({
10227
+ var TenantWorkbenchPageContextSchema = z12.object({
9998
10228
  workflow: JsonObjectSchema.optional(),
9999
10229
  agent: JsonObjectSchema.optional(),
10000
10230
  agentId: ContractIdentifierSchema.optional(),
10001
10231
  designProject: JsonObjectSchema.optional(),
10002
10232
  designMetadataId: ContractIdentifierSchema.optional(),
10003
- iframeUrl: z11.string().trim().min(1).optional(),
10004
- info: z11.object({
10233
+ iframeUrl: z12.string().trim().min(1).optional(),
10234
+ info: z12.object({
10005
10235
  displayName: LocalizedTextSchema.optional(),
10006
10236
  description: LocalizedTextSchema.optional(),
10007
- iconUrl: z11.string().trim().min(1).optional()
10237
+ iconUrl: z12.string().trim().min(1).optional()
10008
10238
  }).strict().optional(),
10009
- isBuiltinPinned: z11.boolean().optional(),
10010
- isBuiltinReadonly: z11.boolean().optional()
10239
+ isBuiltinPinned: z12.boolean().optional(),
10240
+ isBuiltinReadonly: z12.boolean().optional()
10011
10241
  }).strict();
10012
- var TenantWorkbenchPageEnvelopeSchema = z11.object({
10242
+ var TenantWorkbenchPageEnvelopeSchema = z12.object({
10013
10243
  definition: PageDefinitionSchema,
10014
10244
  context: TenantWorkbenchPageContextSchema
10015
10245
  }).strict().superRefine(({ definition }, context) => {
@@ -10042,56 +10272,56 @@ var TenantWorkbenchPageEnvelopeSchema = z11.object({
10042
10272
  });
10043
10273
  }
10044
10274
  });
10045
- var TenantWorkbenchPageGroupSchema = z11.object({
10275
+ var TenantWorkbenchPageGroupSchema = z12.object({
10046
10276
  id: ContractIdentifierSchema,
10047
- pageIds: z11.array(ContractIdentifierSchema),
10277
+ pageIds: z12.array(ContractIdentifierSchema),
10048
10278
  displayName: LocalizedTextSchema,
10049
- isBuiltIn: z11.boolean(),
10050
- iconUrl: z11.string().optional(),
10051
- sortIndex: z11.number().int().nullable().optional(),
10279
+ isBuiltIn: z12.boolean(),
10280
+ iconUrl: z12.string().optional(),
10281
+ sortIndex: z12.number().int().nullable().optional(),
10052
10282
  presetRelationId: ContractIdentifierSchema.optional(),
10053
10283
  relationKey: ContractIdentifierSchema.nullable().optional(),
10054
10284
  studioId: ContractIdentifierSchema.optional()
10055
10285
  }).strict();
10056
- var TenantWorkbenchConfigSchema = z11.object({
10057
- pages: z11.array(TenantWorkbenchPageEnvelopeSchema),
10058
- pageGroups: z11.array(TenantWorkbenchPageGroupSchema),
10059
- catalog: z11.object({ enabled: z11.boolean().optional(), defaultEntry: z11.boolean().optional() }).strict().optional(),
10060
- quickSwitcherMaxItems: z11.number().int().nonnegative().optional(),
10061
- defaultOrder: z11.object({
10062
- groups: z11.array(ContractIdentifierSchema),
10063
- pages: z11.record(ContractIdentifierSchema, z11.array(ContractIdentifierSchema))
10286
+ var TenantWorkbenchConfigSchema = z12.object({
10287
+ pages: z12.array(TenantWorkbenchPageEnvelopeSchema),
10288
+ pageGroups: z12.array(TenantWorkbenchPageGroupSchema),
10289
+ catalog: z12.object({ enabled: z12.boolean().optional(), defaultEntry: z12.boolean().optional() }).strict().optional(),
10290
+ quickSwitcherMaxItems: z12.number().int().nonnegative().optional(),
10291
+ defaultOrder: z12.object({
10292
+ groups: z12.array(ContractIdentifierSchema),
10293
+ pages: z12.record(ContractIdentifierSchema, z12.array(ContractIdentifierSchema))
10064
10294
  }).strict().optional(),
10065
- customers: z11.object({
10066
- dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
10067
- layoutManagerTools: z11.array(WorkbenchCustomerToolSchema).optional(),
10068
- studioTabsMode: z11.enum(["dropdown", "tabs"]).optional(),
10069
- historyWatermark: z11.object({
10070
- svgUrl: z11.string().optional(),
10071
- coverage: z11.array(z11.enum(["list", "detail", "download"])).optional(),
10072
- maxLongEdgeRatio: z11.number().positive().optional(),
10073
- sizing: z11.object({
10295
+ customers: z12.object({
10296
+ dropdownToolsDefault: z12.array(ContractIdentifierSchema).optional(),
10297
+ layoutManagerTools: z12.array(WorkbenchCustomerToolSchema).optional(),
10298
+ studioTabsMode: z12.enum(["dropdown", "tabs"]).optional(),
10299
+ historyWatermark: z12.object({
10300
+ svgUrl: z12.string().optional(),
10301
+ coverage: z12.array(z12.enum(["list", "detail", "download"])).optional(),
10302
+ maxLongEdgeRatio: z12.number().positive().optional(),
10303
+ sizing: z12.object({
10074
10304
  mode: ContractIdentifierSchema,
10075
- heightRatio: z11.number().positive().optional(),
10076
- minHeightPx: z11.number().nonnegative().optional(),
10077
- maxHeightPx: z11.number().nonnegative().optional()
10305
+ heightRatio: z12.number().positive().optional(),
10306
+ minHeightPx: z12.number().nonnegative().optional(),
10307
+ maxHeightPx: z12.number().nonnegative().optional()
10078
10308
  }).strict().optional(),
10079
- enhance: z11.object({
10080
- enabled: z11.boolean().optional(),
10081
- backgroundLumaThreshold: z11.number().min(0).max(1).optional(),
10082
- stroke: z11.object({
10083
- color: z11.string().optional(),
10084
- opacity: z11.number().min(0).max(1).optional(),
10085
- widthRatio: z11.number().nonnegative().optional(),
10086
- blurRatio: z11.number().nonnegative().optional(),
10087
- steps: z11.number().int().positive().optional()
10309
+ enhance: z12.object({
10310
+ enabled: z12.boolean().optional(),
10311
+ backgroundLumaThreshold: z12.number().min(0).max(1).optional(),
10312
+ stroke: z12.object({
10313
+ color: z12.string().optional(),
10314
+ opacity: z12.number().min(0).max(1).optional(),
10315
+ widthRatio: z12.number().nonnegative().optional(),
10316
+ blurRatio: z12.number().nonnegative().optional(),
10317
+ steps: z12.number().int().positive().optional()
10088
10318
  }).strict().optional()
10089
10319
  }).strict().optional()
10090
10320
  }).strict().optional(),
10091
- layoutManagerEnabled: z11.boolean().optional(),
10092
- existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
10093
- historyColumnsDefault: z11.number().int().min(1).max(6).optional(),
10094
- studioOverrides: z11.array(WorkbenchStudioOverrideSchema).optional()
10321
+ layoutManagerEnabled: z12.boolean().optional(),
10322
+ existingToolsDefault: z12.array(ContractIdentifierSchema).optional(),
10323
+ historyColumnsDefault: z12.number().int().min(1).max(6).optional(),
10324
+ studioOverrides: z12.array(WorkbenchStudioOverrideSchema).optional()
10095
10325
  }).strict().optional()
10096
10326
  }).strict().superRefine(({ pages, pageGroups }, context) => {
10097
10327
  const pageIds = pages.map(({ definition }) => definition.pageId);
@@ -10115,31 +10345,31 @@ var TenantWorkbenchConfigSchema = z11.object({
10115
10345
  });
10116
10346
  });
10117
10347
  });
10118
- var LoginPageSchema = z11.object({
10119
- background: z11.object({ imageUrl: z11.string().optional(), gradient: z11.string().optional() }).strict().optional(),
10120
- logo: z11.object({
10121
- url: z11.string().optional(),
10122
- lightUrl: z11.string().optional(),
10123
- darkUrl: z11.string().optional(),
10124
- position: z11.enum(["top", "middle", "bottom"]).optional(),
10125
- scale: z11.number().positive().optional()
10348
+ var LoginPageSchema = z12.object({
10349
+ background: z12.object({ imageUrl: z12.string().optional(), gradient: z12.string().optional() }).strict().optional(),
10350
+ logo: z12.object({
10351
+ url: z12.string().optional(),
10352
+ lightUrl: z12.string().optional(),
10353
+ darkUrl: z12.string().optional(),
10354
+ position: z12.enum(["top", "middle", "bottom"]).optional(),
10355
+ scale: z12.number().positive().optional()
10126
10356
  }).strict().optional(),
10127
- customCss: z11.string().optional()
10357
+ customCss: z12.string().optional()
10128
10358
  }).strict();
10129
- var LandingPageDefaultConfigSchema = z11.object({
10130
- mode: z11.literal("default")
10359
+ var LandingPageDefaultConfigSchema = z12.object({
10360
+ mode: z12.literal("default")
10131
10361
  }).strict();
10132
- var LandingPageMarkdownConfigSchema = z11.object({
10133
- mode: z11.literal("markdown"),
10134
- content: z11.string()
10362
+ var LandingPageMarkdownConfigSchema = z12.object({
10363
+ mode: z12.literal("markdown"),
10364
+ content: z12.string()
10135
10365
  }).strict();
10136
- var LandingPageHtmlConfigSchema = z11.object({
10137
- mode: z11.literal("html"),
10138
- content: z11.string()
10366
+ var LandingPageHtmlConfigSchema = z12.object({
10367
+ mode: z12.literal("html"),
10368
+ content: z12.string()
10139
10369
  }).strict();
10140
- var LandingPageIframeConfigSchema = z11.object({
10141
- mode: z11.literal("iframe"),
10142
- url: z11.string().refine((value) => {
10370
+ var LandingPageIframeConfigSchema = z12.object({
10371
+ mode: z12.literal("iframe"),
10372
+ url: z12.string().refine((value) => {
10143
10373
  if (/^\/(?!\/)/.test(value)) {
10144
10374
  return !value.includes("\\");
10145
10375
  }
@@ -10151,420 +10381,420 @@ var LandingPageIframeConfigSchema = z11.object({
10151
10381
  }
10152
10382
  }, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
10153
10383
  }).strict();
10154
- var TenantLandingPageConfigSchema = z11.discriminatedUnion("mode", [
10384
+ var TenantLandingPageConfigSchema = z12.discriminatedUnion("mode", [
10155
10385
  LandingPageDefaultConfigSchema,
10156
10386
  LandingPageMarkdownConfigSchema,
10157
10387
  LandingPageHtmlConfigSchema,
10158
10388
  LandingPageIframeConfigSchema
10159
10389
  ]);
10160
- var TenantApplicationConfigSchema = z11.object({
10161
- theme: z11.object({
10162
- id: z11.string().optional(),
10163
- name: z11.string().optional(),
10164
- title: z11.string().optional(),
10390
+ var TenantApplicationConfigSchema = z12.object({
10391
+ theme: z12.object({
10392
+ id: z12.string().optional(),
10393
+ name: z12.string().optional(),
10394
+ title: z12.string().optional(),
10165
10395
  favicon: AssetVariantsSchema.optional(),
10166
10396
  logo: AssetVariantsSchema.optional(),
10167
- pwaIcon: z11.string().optional(),
10168
- form: z11.object({ variant: z11.enum(["bento", "ghost"]) }).strict().optional(),
10169
- toast: z11.object({
10170
- position: z11.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
10397
+ pwaIcon: z12.string().optional(),
10398
+ form: z12.object({ variant: z12.enum(["bento", "ghost"]) }).strict().optional(),
10399
+ toast: z12.object({
10400
+ position: z12.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
10171
10401
  }).strict().optional(),
10172
- icons: z11.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
10173
- views: z11.object({
10174
- form: z11.object({
10175
- toast: z11.object({ afterCreate: z11.boolean(), afterDelete: z11.boolean() }).strict(),
10176
- progress: z11.enum(["estimate", "infinite"]),
10177
- onlyResult: z11.boolean(),
10178
- tabular: z11.object({ theme: z11.enum(["default", "tentiary", "primary"]) }).strict()
10402
+ icons: z12.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
10403
+ views: z12.object({
10404
+ form: z12.object({
10405
+ toast: z12.object({ afterCreate: z12.boolean(), afterDelete: z12.boolean() }).strict(),
10406
+ progress: z12.enum(["estimate", "infinite"]),
10407
+ onlyResult: z12.boolean(),
10408
+ tabular: z12.object({ theme: z12.enum(["default", "tentiary", "primary"]) }).strict()
10179
10409
  }).strict()
10180
10410
  }).strict().optional(),
10181
10411
  loginPage: LoginPageSchema.optional(),
10182
- extraLanguageURL: z11.record(z11.string(), z11.string()).optional(),
10183
- hideSpaceHeader: z11.boolean().optional(),
10184
- showSidebarTeamSelector: z11.boolean().optional(),
10185
- showWorkbenchSidebar: z11.boolean().optional(),
10186
- workbenchViewTheme: z11.enum(["default", "bsd-blue"]).optional(),
10187
- defaults: z11.object({
10188
- showFormInImageDetail: z11.boolean().optional(),
10189
- darkMode: z11.enum(["light", "dark", "auto"]).optional(),
10190
- language: z11.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
10191
- showDarkModeToggle: z11.boolean().optional(),
10192
- showLanguageToggle: z11.boolean().optional()
10412
+ extraLanguageURL: z12.record(z12.string(), z12.string()).optional(),
10413
+ hideSpaceHeader: z12.boolean().optional(),
10414
+ showSidebarTeamSelector: z12.boolean().optional(),
10415
+ showWorkbenchSidebar: z12.boolean().optional(),
10416
+ workbenchViewTheme: z12.enum(["default", "bsd-blue"]).optional(),
10417
+ defaults: z12.object({
10418
+ showFormInImageDetail: z12.boolean().optional(),
10419
+ darkMode: z12.enum(["light", "dark", "auto"]).optional(),
10420
+ language: z12.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
10421
+ showDarkModeToggle: z12.boolean().optional(),
10422
+ showLanguageToggle: z12.boolean().optional()
10193
10423
  }).strict().optional(),
10194
- modules: z11.object({
10195
- monkeysSpaceSidebar: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
10196
- monkeysSpaceHeadbar: z11.union([
10197
- z11.literal("*"),
10198
- z11.array(TenantHeadbarModuleItemSchema)
10424
+ modules: z12.object({
10425
+ monkeysSpaceSidebar: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional(),
10426
+ monkeysSpaceHeadbar: z12.union([
10427
+ z12.literal("*"),
10428
+ z12.array(TenantHeadbarModuleItemSchema)
10199
10429
  ]).optional(),
10200
- settingsSidebar: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional()
10430
+ settingsSidebar: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional()
10201
10431
  }).strict().optional(),
10202
10432
  headbar: ThemeHeadbarSchema.optional(),
10203
- kernelLayout: z11.object({
10204
- navigationMode: z11.enum(["sidebar", "topbar"]).optional(),
10205
- allowNavigationModeSwitch: z11.boolean().optional(),
10433
+ kernelLayout: z12.object({
10434
+ navigationMode: z12.enum(["sidebar", "topbar"]).optional(),
10435
+ allowNavigationModeSwitch: z12.boolean().optional(),
10206
10436
  headbar: KernelHeadbarSchema.optional()
10207
10437
  }).strict().optional(),
10208
- paginationPosition: z11.enum(["left", "right"]).optional(),
10209
- ugcViewIconOnlyMode: z11.boolean().optional(),
10210
- workflowPreviewExecutionGrid: z11.object({
10211
- selectionModeDisplayType: z11.enum(["operation-button", "dropdown-menu"]).optional(),
10212
- clickBehavior: z11.enum(["preview", "select", "fill-form", "none"]).optional(),
10213
- showErrorFilter: z11.boolean().optional(),
10214
- displayType: z11.enum(["grid", "masonry"]).optional(),
10215
- showDetailButton: z11.boolean().optional()
10438
+ paginationPosition: z12.enum(["left", "right"]).optional(),
10439
+ ugcViewIconOnlyMode: z12.boolean().optional(),
10440
+ workflowPreviewExecutionGrid: z12.object({
10441
+ selectionModeDisplayType: z12.enum(["operation-button", "dropdown-menu"]).optional(),
10442
+ clickBehavior: z12.enum(["preview", "select", "fill-form", "none"]).optional(),
10443
+ showErrorFilter: z12.boolean().optional(),
10444
+ displayType: z12.enum(["grid", "masonry"]).optional(),
10445
+ showDetailButton: z12.boolean().optional()
10216
10446
  }).strict().optional(),
10217
- workbenchSidebarDefaultOpen: z11.boolean().optional(),
10218
- workbenchSidebarMoreAction: z11.boolean().optional(),
10219
- workbenchSidebarApart: z11.boolean().optional(),
10220
- workbenchSidebarToggleGroupDetail: z11.boolean().optional(),
10221
- workbenchSidebarViewType: z11.boolean().optional(),
10222
- workbenchSidebarFormViewEmbed: z11.boolean().optional(),
10223
- workbenchSidebarModernMode: z11.boolean().optional(),
10224
- ugc: z11.object({ onItemClick: z11.boolean(), subtitle: z11.boolean().optional() }).strict().optional(),
10225
- uniImagePreview: z11.boolean().optional(),
10226
- imagePreviewStyle: z11.union([z11.literal(false), z11.enum(["simple", "normal", "uni"])]).optional(),
10227
- teamAsUser: z11.boolean().optional(),
10228
- themeMode: z11.enum(["shadow", "border"]).optional(),
10229
- density: z11.enum(["compact", "default", "comfortable"]).optional(),
10230
- pageZoom: z11.number().positive().optional(),
10231
- miniMode: z11.object({ showPreviewViewExecutionResultGrid: z11.boolean() }).strict().optional(),
10232
- workflow: z11.object({ allowConcurrentRuns: z11.boolean() }).strict().optional(),
10233
- historyResult: z11.object({ display: z11.boolean() }).strict().optional(),
10234
- uploader: z11.object({
10235
- orientation: z11.enum(["vertical", "horizontal"]),
10236
- pasteButton: z11.boolean(),
10237
- statusText: z11.boolean()
10447
+ workbenchSidebarDefaultOpen: z12.boolean().optional(),
10448
+ workbenchSidebarMoreAction: z12.boolean().optional(),
10449
+ workbenchSidebarApart: z12.boolean().optional(),
10450
+ workbenchSidebarToggleGroupDetail: z12.boolean().optional(),
10451
+ workbenchSidebarViewType: z12.boolean().optional(),
10452
+ workbenchSidebarFormViewEmbed: z12.boolean().optional(),
10453
+ workbenchSidebarModernMode: z12.boolean().optional(),
10454
+ ugc: z12.object({ onItemClick: z12.boolean(), subtitle: z12.boolean().optional() }).strict().optional(),
10455
+ uniImagePreview: z12.boolean().optional(),
10456
+ imagePreviewStyle: z12.union([z12.literal(false), z12.enum(["simple", "normal", "uni"])]).optional(),
10457
+ teamAsUser: z12.boolean().optional(),
10458
+ themeMode: z12.enum(["shadow", "border"]).optional(),
10459
+ density: z12.enum(["compact", "default", "comfortable"]).optional(),
10460
+ pageZoom: z12.number().positive().optional(),
10461
+ miniMode: z12.object({ showPreviewViewExecutionResultGrid: z12.boolean() }).strict().optional(),
10462
+ workflow: z12.object({ allowConcurrentRuns: z12.boolean() }).strict().optional(),
10463
+ historyResult: z12.object({ display: z12.boolean() }).strict().optional(),
10464
+ uploader: z12.object({
10465
+ orientation: z12.enum(["vertical", "horizontal"]),
10466
+ pasteButton: z12.boolean(),
10467
+ statusText: z12.boolean()
10238
10468
  }).strict().optional(),
10239
- designProjects: z11.object({
10240
- oneOnOne: z11.boolean(),
10241
- newTabOpenBoard: z11.boolean(),
10242
- defaultShowGrid: z11.boolean().optional(),
10243
- createDefaultFrame: z11.boolean(),
10244
- showPageMenu: z11.boolean(),
10245
- showMainMenu: z11.boolean(),
10246
- showStylePanel: z11.boolean(),
10247
- showToolbar: z11.boolean(),
10248
- toolbarPosition: z11.enum(["bottom", "left"]).optional(),
10249
- showContextMenu: z11.boolean(),
10250
- showActionsMenu: z11.boolean(),
10251
- showPageAndLayerSidebar: z11.boolean().optional(),
10252
- showBoardOperationSidebar: z11.boolean().optional(),
10253
- showMiniToolsToolbar: z11.boolean().optional(),
10254
- showRightSidebar: z11.boolean().optional(),
10255
- showRealtimeDrawing: z11.boolean().optional(),
10256
- showWorkflow: z11.boolean().optional(),
10257
- showVersionManager: z11.boolean().optional(),
10258
- showAgent: z11.boolean().optional(),
10259
- AgentTools: z11.array(ContractIdentifierSchema).optional()
10469
+ designProjects: z12.object({
10470
+ oneOnOne: z12.boolean(),
10471
+ newTabOpenBoard: z12.boolean(),
10472
+ defaultShowGrid: z12.boolean().optional(),
10473
+ createDefaultFrame: z12.boolean(),
10474
+ showPageMenu: z12.boolean(),
10475
+ showMainMenu: z12.boolean(),
10476
+ showStylePanel: z12.boolean(),
10477
+ showToolbar: z12.boolean(),
10478
+ toolbarPosition: z12.enum(["bottom", "left"]).optional(),
10479
+ showContextMenu: z12.boolean(),
10480
+ showActionsMenu: z12.boolean(),
10481
+ showPageAndLayerSidebar: z12.boolean().optional(),
10482
+ showBoardOperationSidebar: z12.boolean().optional(),
10483
+ showMiniToolsToolbar: z12.boolean().optional(),
10484
+ showRightSidebar: z12.boolean().optional(),
10485
+ showRealtimeDrawing: z12.boolean().optional(),
10486
+ showWorkflow: z12.boolean().optional(),
10487
+ showVersionManager: z12.boolean().optional(),
10488
+ showAgent: z12.boolean().optional(),
10489
+ AgentTools: z12.array(ContractIdentifierSchema).optional()
10260
10490
  }).strict().optional(),
10261
10491
  workbench: TenantWorkbenchConfigSchema.optional(),
10262
- visionProWorkflows: z11.array(ContractIdentifierSchema).optional(),
10263
- initTeam: z11.boolean().optional(),
10264
- imageThumbnail: z11.boolean().optional(),
10265
- pages: z11.object({
10266
- allowPageKeys: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
10492
+ visionProWorkflows: z12.array(ContractIdentifierSchema).optional(),
10493
+ initTeam: z12.boolean().optional(),
10494
+ imageThumbnail: z12.boolean().optional(),
10495
+ pages: z12.object({
10496
+ allowPageKeys: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]),
10267
10497
  defaultPageKey: ContractIdentifierSchema.optional()
10268
10498
  }).strict().optional(),
10269
- agent: z11.object({
10499
+ agent: z12.object({
10270
10500
  logo: AssetVariantsSchema.optional(),
10271
- brandDisplayMode: z11.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
10272
- density: z11.enum(["compact", "default", "comfortable"]).optional()
10501
+ brandDisplayMode: z12.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
10502
+ density: z12.enum(["compact", "default", "comfortable"]).optional()
10273
10503
  }).strict().optional()
10274
10504
  }).strict(),
10275
10505
  landingPage: TenantLandingPageConfigSchema.optional(),
10276
- auth: z11.object({
10277
- enabled: z11.array(ContractIdentifierSchema).default([]),
10278
- oidc: z11.object({ buttonText: z11.string().optional(), autoSignin: z11.boolean().optional() }).strict().optional(),
10279
- password: z11.object({ disableAutoRegister: z11.boolean().optional() }).strict().optional(),
10280
- hideAuthToast: z11.boolean().optional(),
10281
- autoReload: z11.boolean().optional(),
10282
- defaultOtherTeam: z11.boolean().optional()
10506
+ auth: z12.object({
10507
+ enabled: z12.array(ContractIdentifierSchema).default([]),
10508
+ oidc: z12.object({ buttonText: z12.string().optional(), autoSignin: z12.boolean().optional() }).strict().optional(),
10509
+ password: z12.object({ disableAutoRegister: z12.boolean().optional() }).strict().optional(),
10510
+ hideAuthToast: z12.boolean().optional(),
10511
+ autoReload: z12.boolean().optional(),
10512
+ defaultOtherTeam: z12.boolean().optional()
10283
10513
  }).strict(),
10284
- endpoints: z11.record(ContractIdentifierSchema, z11.string()),
10285
- module: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
10286
- behavior: z11.object({
10287
- clearWorkflowFormStorageAfterUpdate: z11.boolean().optional(),
10288
- autoApproveOAuth: z11.boolean().optional(),
10289
- rememberWorkflowModelSelection: z11.boolean().optional()
10514
+ endpoints: z12.record(ContractIdentifierSchema, z12.string()),
10515
+ module: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]),
10516
+ behavior: z12.object({
10517
+ clearWorkflowFormStorageAfterUpdate: z12.boolean().optional(),
10518
+ autoApproveOAuth: z12.boolean().optional(),
10519
+ rememberWorkflowModelSelection: z12.boolean().optional()
10290
10520
  }).strict(),
10291
- dataManagement: z11.object({
10292
- favoriteBucketId: z11.string().optional(),
10293
- pairedBucketId: z11.string().optional(),
10294
- galleryBucketId: z11.string().optional(),
10295
- dataBrowserDefaultBucketId: z11.string().optional(),
10296
- workflowResultBucketId: z11.string().optional(),
10297
- homeAdvertisement: z11.object({
10521
+ dataManagement: z12.object({
10522
+ favoriteBucketId: z12.string().optional(),
10523
+ pairedBucketId: z12.string().optional(),
10524
+ galleryBucketId: z12.string().optional(),
10525
+ dataBrowserDefaultBucketId: z12.string().optional(),
10526
+ workflowResultBucketId: z12.string().optional(),
10527
+ homeAdvertisement: z12.object({
10298
10528
  bucketId: ContractIdentifierSchema,
10299
10529
  viewId: ContractIdentifierSchema.optional(),
10300
- viewType: z11.enum(["filter", "container", "share_link"]).optional(),
10530
+ viewType: z12.enum(["filter", "container", "share_link"]).optional(),
10301
10531
  teamId: ContractIdentifierSchema.optional(),
10302
- teamOnly: z11.boolean().optional(),
10303
- pageSize: z11.number().int().positive().optional(),
10304
- sortBy: z11.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
10305
- sortOrder: z11.enum(["asc", "desc"]).optional(),
10306
- fieldMap: z11.record(z11.string(), z11.string()).optional(),
10307
- columnIds: z11.record(z11.string(), z11.string()).optional()
10532
+ teamOnly: z12.boolean().optional(),
10533
+ pageSize: z12.number().int().positive().optional(),
10534
+ sortBy: z12.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
10535
+ sortOrder: z12.enum(["asc", "desc"]).optional(),
10536
+ fieldMap: z12.record(z12.string(), z12.string()).optional(),
10537
+ columnIds: z12.record(z12.string(), z12.string()).optional()
10308
10538
  }).strict().optional(),
10309
- homeTrendAssistant: z11.object({
10539
+ homeTrendAssistant: z12.object({
10310
10540
  bucketId: ContractIdentifierSchema.optional(),
10311
10541
  viewId: ContractIdentifierSchema.optional(),
10312
10542
  viewInstanceId: ContractIdentifierSchema.optional(),
10313
- viewName: z11.string().optional(),
10543
+ viewName: z12.string().optional(),
10314
10544
  teamId: ContractIdentifierSchema.optional(),
10315
10545
  designOptionsWorkflowId: ContractIdentifierSchema.optional(),
10316
- tep: z11.object({ baseUrl: z11.string().optional(), timeoutMs: z11.number().int().positive().optional() }).strict().optional(),
10317
- runtime: z11.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z11.boolean(), tepAuthorizationConfigured: z11.boolean(), tepCookieConfigured: z11.boolean() }).strict().optional()
10546
+ tep: z12.object({ baseUrl: z12.string().optional(), timeoutMs: z12.number().int().positive().optional() }).strict().optional(),
10547
+ runtime: z12.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z12.boolean(), tepAuthorizationConfigured: z12.boolean(), tepCookieConfigured: z12.boolean() }).strict().optional()
10318
10548
  }).strict().optional(),
10319
- sharing: z11.object({
10320
- silentViewLinks: z11.object({ enabled: z11.boolean().optional(), placement: z11.object({ mode: z11.enum(["sourceBucket", "bucket"]).optional(), bucketId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
10321
- shareAccess: z11.object({ publicLinksEnabled: z11.boolean().optional(), passwordGateEnabled: z11.boolean().optional(), passwordAccessTtlSeconds: z11.number().int().positive().optional(), defaultViewTreeDelivery: z11.enum(["manual", "auto"]).optional() }).strict().optional(),
10322
- shareDialog: z11.object({
10323
- audience: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["user", "team", "public"])).optional(), default: z11.enum(["user", "team", "public"]).optional() }).strict().optional(),
10324
- accessLevel: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["read", "write"])).optional(), default: z11.enum(["read", "write"]).optional() }).strict().optional(),
10325
- viewTreeDelivery: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["manual", "auto"])).optional(), default: z11.enum(["manual", "auto"]).optional() }).strict().optional()
10549
+ sharing: z12.object({
10550
+ silentViewLinks: z12.object({ enabled: z12.boolean().optional(), placement: z12.object({ mode: z12.enum(["sourceBucket", "bucket"]).optional(), bucketId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
10551
+ shareAccess: z12.object({ publicLinksEnabled: z12.boolean().optional(), passwordGateEnabled: z12.boolean().optional(), passwordAccessTtlSeconds: z12.number().int().positive().optional(), defaultViewTreeDelivery: z12.enum(["manual", "auto"]).optional() }).strict().optional(),
10552
+ shareDialog: z12.object({
10553
+ audience: z12.object({ enabled: z12.boolean().optional(), allowed: z12.array(z12.enum(["user", "team", "public"])).optional(), default: z12.enum(["user", "team", "public"]).optional() }).strict().optional(),
10554
+ accessLevel: z12.object({ enabled: z12.boolean().optional(), allowed: z12.array(z12.enum(["read", "write"])).optional(), default: z12.enum(["read", "write"]).optional() }).strict().optional(),
10555
+ viewTreeDelivery: z12.object({ enabled: z12.boolean().optional(), allowed: z12.array(z12.enum(["manual", "auto"])).optional(), default: z12.enum(["manual", "auto"]).optional() }).strict().optional()
10326
10556
  }).strict().optional()
10327
10557
  }).strict().optional()
10328
10558
  }).strict().optional(),
10329
- compute: z11.object({
10330
- integrations: z11.object({
10331
- harbor: z11.object({ endpoint: z11.string().optional(), projectScopes: z11.array(z11.string()).optional(), authMode: z11.string().optional(), principal: z11.string().optional(), autoSync: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
10332
- gitlab: z11.object({ baseUrl: z11.string().optional(), groupScopes: z11.array(z11.string()).optional(), tokenMode: z11.string().optional(), deployProjectPath: z11.string().optional(), deploymentReportsEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
10333
- kubernetes: z11.object({ accessMode: z11.string().optional(), clusterAlias: z11.string().optional(), agentProjectPath: z11.string().optional(), agentName: z11.string().optional(), namespaceScopes: z11.array(z11.string()).optional(), rolloutObserverEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional()
10559
+ compute: z12.object({
10560
+ integrations: z12.object({
10561
+ harbor: z12.object({ endpoint: z12.string().optional(), projectScopes: z12.array(z12.string()).optional(), authMode: z12.string().optional(), principal: z12.string().optional(), autoSync: z12.boolean().optional(), proxyUrl: z12.string().optional() }).strict().optional(),
10562
+ gitlab: z12.object({ baseUrl: z12.string().optional(), groupScopes: z12.array(z12.string()).optional(), tokenMode: z12.string().optional(), deployProjectPath: z12.string().optional(), deploymentReportsEnabled: z12.boolean().optional(), proxyUrl: z12.string().optional() }).strict().optional(),
10563
+ kubernetes: z12.object({ accessMode: z12.string().optional(), clusterAlias: z12.string().optional(), agentProjectPath: z12.string().optional(), agentName: z12.string().optional(), namespaceScopes: z12.array(z12.string()).optional(), rolloutObserverEnabled: z12.boolean().optional(), proxyUrl: z12.string().optional() }).strict().optional()
10334
10564
  }).strict().optional()
10335
10565
  }).strict().optional(),
10336
- data: z11.object({}).strict().optional(),
10337
- storage: z11.object({
10338
- presignMode: z11.enum(["frontend", "backend", "both"]).optional(),
10339
- presign: z11.object({
10340
- expiresInSeconds: z11.number().int().positive(),
10341
- buckets: z11.array(
10342
- z11.object({
10566
+ data: z12.object({}).strict().optional(),
10567
+ storage: z12.object({
10568
+ presignMode: z12.enum(["frontend", "backend", "both"]).optional(),
10569
+ presign: z12.object({
10570
+ expiresInSeconds: z12.number().int().positive(),
10571
+ buckets: z12.array(
10572
+ z12.object({
10343
10573
  id: ContractIdentifierSchema,
10344
10574
  provider: ContractIdentifierSchema,
10345
10575
  preferredUrlPatternId: ContractIdentifierSchema,
10346
- urlPatterns: z11.array(
10347
- z11.object({
10576
+ urlPatterns: z12.array(
10577
+ z12.object({
10348
10578
  id: ContractIdentifierSchema,
10349
- type: z11.enum(["bucket-hostname", "provider-hostname"]),
10350
- hostname: z11.string().trim().min(1),
10351
- preferred: z11.boolean().optional(),
10352
- bucketSegment: z11.string().optional()
10579
+ type: z12.enum(["bucket-hostname", "provider-hostname"]),
10580
+ hostname: z12.string().trim().min(1),
10581
+ preferred: z12.boolean().optional(),
10582
+ bucketSegment: z12.string().optional()
10353
10583
  }).strict()
10354
10584
  )
10355
10585
  }).strict()
10356
10586
  )
10357
10587
  }).strict().optional()
10358
10588
  }).strict().optional(),
10359
- monkeyData: z11.object({ baseUrl: z11.string().optional() }).strict().optional()
10589
+ monkeyData: z12.object({ baseUrl: z12.string().optional() }).strict().optional()
10360
10590
  }).strict();
10361
- var TenantProductConfigSchema = z11.object({
10362
- contract: z11.literal("TenantProductConfig"),
10591
+ var TenantProductConfigSchema = z12.object({
10592
+ contract: z12.literal("TenantProductConfig"),
10363
10593
  tenantId: ContractIdentifierSchema,
10364
10594
  appId: ContractIdentifierSchema,
10365
10595
  environment: ContractIdentifierSchema,
10366
10596
  designTokens: TenantDesignTokensConfigSchema,
10367
- moduleRefs: z11.array(ContractIdentifierSchema).default([]),
10368
- pageRefs: z11.array(ContractIdentifierSchema).default([]),
10369
- featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
10597
+ moduleRefs: z12.array(ContractIdentifierSchema).default([]),
10598
+ pageRefs: z12.array(ContractIdentifierSchema).default([]),
10599
+ featureFlags: z12.record(z12.string(), z12.boolean()).default({}),
10370
10600
  authBinding: TenantAuthBindingsSchema,
10371
10601
  dataBinding: TenantDataBindingsSchema,
10372
- sourceMap: z11.record(z11.string(), ContractIdentifierSchema),
10373
- warnings: z11.array(z11.string()).default([]),
10602
+ sourceMap: z12.record(z12.string(), ContractIdentifierSchema),
10603
+ warnings: z12.array(z12.string()).default([]),
10374
10604
  applicationConfig: TenantApplicationConfigSchema
10375
10605
  }).strict();
10376
- var TenantRuntimeConfigSchema = z11.object({
10377
- contract: z11.literal("TenantRuntimeConfig"),
10606
+ var TenantRuntimeConfigSchema = z12.object({
10607
+ contract: z12.literal("TenantRuntimeConfig"),
10378
10608
  tenantId: ContractIdentifierSchema,
10379
10609
  appId: ContractIdentifierSchema,
10380
10610
  environment: ContractIdentifierSchema,
10381
10611
  designTokens: ResolvedThemeTokensSchema,
10382
- moduleRefs: z11.array(ContractIdentifierSchema).default([]),
10383
- pageRefs: z11.array(ContractIdentifierSchema).default([]),
10384
- featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
10612
+ moduleRefs: z12.array(ContractIdentifierSchema).default([]),
10613
+ pageRefs: z12.array(ContractIdentifierSchema).default([]),
10614
+ featureFlags: z12.record(z12.string(), z12.boolean()).default({}),
10385
10615
  authBinding: TenantAuthBindingsSchema,
10386
10616
  dataBinding: TenantDataBindingsSchema,
10387
- sourceMap: z11.record(z11.string(), ContractIdentifierSchema),
10388
- warnings: z11.array(z11.string()).default([]),
10617
+ sourceMap: z12.record(z12.string(), ContractIdentifierSchema),
10618
+ warnings: z12.array(z12.string()).default([]),
10389
10619
  applicationConfig: TenantApplicationConfigSchema
10390
10620
  }).strict();
10391
10621
 
10392
10622
  // src/contracts/trend.ts
10393
- import { z as z12 } from "zod";
10394
- var RadarDecisionMetricsSchema = z12.object({
10395
- currentSales: z12.number().finite(),
10396
- forecastSales: z12.number().finite(),
10397
- searchHeat: z12.number().finite(),
10398
- socialHeat: z12.number().finite(),
10399
- confidence: z12.number().min(0).max(1)
10623
+ import { z as z13 } from "zod";
10624
+ var RadarDecisionMetricsSchema = z13.object({
10625
+ currentSales: z13.number().finite(),
10626
+ forecastSales: z13.number().finite(),
10627
+ searchHeat: z13.number().finite(),
10628
+ socialHeat: z13.number().finite(),
10629
+ confidence: z13.number().min(0).max(1)
10400
10630
  }).strict();
10401
- var TrendSourceSchema = z12.object({
10631
+ var TrendSourceSchema = z13.object({
10402
10632
  sourceId: ContractIdentifierSchema,
10403
10633
  provider: ContractIdentifierSchema,
10404
- channel: z12.enum(["trend", "ecommerce", "social", "search", "internal"]),
10634
+ channel: z13.enum(["trend", "ecommerce", "social", "search", "internal"]),
10405
10635
  collectedAt: IsoDateTimeSchema,
10406
- sourceUrl: z12.string().url().optional(),
10407
- evidenceRefs: z12.array(EntityRefSchema).default([])
10636
+ sourceUrl: z13.string().url().optional(),
10637
+ evidenceRefs: z13.array(EntityRefSchema).default([])
10408
10638
  }).strict();
10409
- var TrendIngestRunSchema = z12.object({
10410
- contract: z12.literal("TrendIngestRun"),
10639
+ var TrendIngestRunSchema = z13.object({
10640
+ contract: z13.literal("TrendIngestRun"),
10411
10641
  ingestRunId: ContractIdentifierSchema,
10412
10642
  sourceId: ContractIdentifierSchema,
10413
10643
  requestId: ContractIdentifierSchema,
10414
10644
  idempotencyKey: ContractIdentifierSchema,
10415
- status: z12.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
10416
- recordCount: z12.number().int().nonnegative(),
10417
- errorCount: z12.number().int().nonnegative(),
10645
+ status: z13.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
10646
+ recordCount: z13.number().int().nonnegative(),
10647
+ errorCount: z13.number().int().nonnegative(),
10418
10648
  startedAt: IsoDateTimeSchema,
10419
10649
  completedAt: IsoDateTimeSchema.optional()
10420
10650
  }).strict();
10421
- var TrendSourceRecordSchema = z12.object({
10422
- contract: z12.literal("TrendSourceRecord"),
10651
+ var TrendSourceRecordSchema = z13.object({
10652
+ contract: z13.literal("TrendSourceRecord"),
10423
10653
  sourceRecordId: ContractIdentifierSchema,
10424
10654
  source: TrendSourceSchema,
10425
10655
  ingestRunRef: EntityRefSchema,
10426
- recordVersion: z12.number().int().positive(),
10656
+ recordVersion: z13.number().int().positive(),
10427
10657
  contentHash: Sha256Schema,
10428
10658
  payload: JsonValueSchema,
10429
10659
  idempotencyKey: ContractIdentifierSchema,
10430
10660
  collectedAt: IsoDateTimeSchema
10431
10661
  }).strict();
10432
- var HotwordBodySchema = z12.object({
10433
- contract: z12.literal("HotwordBody"),
10662
+ var HotwordBodySchema = z13.object({
10663
+ contract: z13.literal("HotwordBody"),
10434
10664
  hotwordId: ContractIdentifierSchema,
10435
- label: z12.string().trim().min(1),
10436
- normalizedLabel: z12.string().trim().min(1),
10437
- categories: z12.array(ContractIdentifierSchema).default([]),
10438
- sourceRefs: z12.array(TrendSourceSchema).min(1),
10439
- relationRefs: z12.array(EntityRefSchema).default([]),
10665
+ label: z13.string().trim().min(1),
10666
+ normalizedLabel: z13.string().trim().min(1),
10667
+ categories: z13.array(ContractIdentifierSchema).default([]),
10668
+ sourceRefs: z13.array(TrendSourceSchema).min(1),
10669
+ relationRefs: z13.array(EntityRefSchema).default([]),
10440
10670
  createdAt: IsoDateTimeSchema,
10441
10671
  updatedAt: IsoDateTimeSchema
10442
10672
  }).strict();
10443
10673
  var CommerceBodyFieldsSchema = {
10444
- displayName: z12.string().trim().min(1),
10445
- normalizedName: z12.string().trim().min(1),
10446
- categories: z12.array(ContractIdentifierSchema).default([]),
10447
- sourceRefs: z12.array(EntityRefSchema).min(1),
10448
- relationRefs: z12.array(EntityRefSchema).default([]),
10674
+ displayName: z13.string().trim().min(1),
10675
+ normalizedName: z13.string().trim().min(1),
10676
+ categories: z13.array(ContractIdentifierSchema).default([]),
10677
+ sourceRefs: z13.array(EntityRefSchema).min(1),
10678
+ relationRefs: z13.array(EntityRefSchema).default([]),
10449
10679
  createdAt: IsoDateTimeSchema,
10450
10680
  updatedAt: IsoDateTimeSchema
10451
10681
  };
10452
- var BrandBodySchema = z12.object({
10453
- contract: z12.literal("BrandBody"),
10682
+ var BrandBodySchema = z13.object({
10683
+ contract: z13.literal("BrandBody"),
10454
10684
  brandId: ContractIdentifierSchema,
10455
10685
  ...CommerceBodyFieldsSchema
10456
10686
  }).strict();
10457
- var ProductBodySchema = z12.object({
10458
- contract: z12.literal("ProductBody"),
10687
+ var ProductBodySchema = z13.object({
10688
+ contract: z13.literal("ProductBody"),
10459
10689
  productId: ContractIdentifierSchema,
10460
10690
  brandRef: EntityRefSchema.optional(),
10461
10691
  ...CommerceBodyFieldsSchema
10462
10692
  }).strict();
10463
- var TrendMetricSnapshotSchema = z12.object({
10464
- contract: z12.literal("TrendMetricSnapshot"),
10693
+ var TrendMetricSnapshotSchema = z13.object({
10694
+ contract: z13.literal("TrendMetricSnapshot"),
10465
10695
  snapshotId: ContractIdentifierSchema,
10466
10696
  subjectRef: EntityRefSchema,
10467
10697
  observedAt: IsoDateTimeSchema,
10468
- metrics: z12.record(z12.string(), z12.number().finite()),
10469
- confidence: z12.number().min(0).max(1),
10470
- evidenceRefs: z12.array(EntityRefSchema).min(1)
10698
+ metrics: z13.record(z13.string(), z13.number().finite()),
10699
+ confidence: z13.number().min(0).max(1),
10700
+ evidenceRefs: z13.array(EntityRefSchema).min(1)
10471
10701
  }).strict();
10472
- var RadarScoreModelBodySchema = z12.object({
10473
- contract: z12.literal("RadarScoreModelBody"),
10702
+ var RadarScoreModelBodySchema = z13.object({
10703
+ contract: z13.literal("RadarScoreModelBody"),
10474
10704
  modelId: ContractIdentifierSchema,
10475
- version: z12.number().int().positive(),
10705
+ version: z13.number().int().positive(),
10476
10706
  weights: RadarDecisionMetricsSchema,
10477
- thresholds: z12.record(z12.string(), z12.number().finite()).default({}),
10478
- explanationRules: z12.record(z12.string(), z12.string().trim().min(1)).default({}),
10707
+ thresholds: z13.record(z13.string(), z13.number().finite()).default({}),
10708
+ explanationRules: z13.record(z13.string(), z13.string().trim().min(1)).default({}),
10479
10709
  createdAt: IsoDateTimeSchema
10480
10710
  }).strict();
10481
- var RadarScoreProjectionSchema = z12.object({
10482
- contract: z12.literal("RadarScoreProjection"),
10711
+ var RadarScoreProjectionSchema = z13.object({
10712
+ contract: z13.literal("RadarScoreProjection"),
10483
10713
  projectionId: ContractIdentifierSchema,
10484
10714
  subjectRef: EntityRefSchema,
10485
10715
  modelRef: EntityRefSchema,
10486
- totalScore: z12.number().finite(),
10716
+ totalScore: z13.number().finite(),
10487
10717
  dimensions: RadarDecisionMetricsSchema,
10488
- evidenceRefs: z12.array(EntityRefSchema).min(1),
10718
+ evidenceRefs: z13.array(EntityRefSchema).min(1),
10489
10719
  freshnessAt: IsoDateTimeSchema
10490
10720
  }).strict();
10491
- var RadarPanoramaNodeSchema = z12.object({
10721
+ var RadarPanoramaNodeSchema = z13.object({
10492
10722
  ref: EntityRefSchema,
10493
- label: z12.string().trim().min(1),
10494
- categories: z12.array(ContractIdentifierSchema).default([]),
10495
- score: z12.number().finite().optional(),
10723
+ label: z13.string().trim().min(1),
10724
+ categories: z13.array(ContractIdentifierSchema).default([]),
10725
+ score: z13.number().finite().optional(),
10496
10726
  freshnessAt: IsoDateTimeSchema.optional()
10497
10727
  }).strict();
10498
- var RadarPanoramaEdgeSchema = z12.object({
10728
+ var RadarPanoramaEdgeSchema = z13.object({
10499
10729
  sourceRef: EntityRefSchema,
10500
10730
  targetRef: EntityRefSchema,
10501
10731
  relation: ContractIdentifierSchema,
10502
- evidenceRefs: z12.array(EntityRefSchema).default([])
10732
+ evidenceRefs: z13.array(EntityRefSchema).default([])
10503
10733
  }).strict();
10504
- var RadarPanoramaSchema = z12.object({
10505
- contract: z12.literal("RadarPanorama"),
10506
- nodes: z12.array(RadarPanoramaNodeSchema),
10507
- edges: z12.array(RadarPanoramaEdgeSchema),
10734
+ var RadarPanoramaSchema = z13.object({
10735
+ contract: z13.literal("RadarPanorama"),
10736
+ nodes: z13.array(RadarPanoramaNodeSchema),
10737
+ edges: z13.array(RadarPanoramaEdgeSchema),
10508
10738
  generatedAt: IsoDateTimeSchema
10509
10739
  }).strict();
10510
- var BrandGeneticsProfileSchema = z12.object({
10511
- contract: z12.literal("BrandGeneticsProfile"),
10740
+ var BrandGeneticsProfileSchema = z13.object({
10741
+ contract: z13.literal("BrandGeneticsProfile"),
10512
10742
  brandRef: EntityRefSchema,
10513
- categories: z12.array(ContractIdentifierSchema).default([]),
10514
- signature: z12.record(ContractIdentifierSchema, z12.number().finite()),
10515
- relatedRefs: z12.array(EntityRefSchema).default([]),
10516
- evidenceRefs: z12.array(EntityRefSchema).default([]),
10743
+ categories: z13.array(ContractIdentifierSchema).default([]),
10744
+ signature: z13.record(ContractIdentifierSchema, z13.number().finite()),
10745
+ relatedRefs: z13.array(EntityRefSchema).default([]),
10746
+ evidenceRefs: z13.array(EntityRefSchema).default([]),
10517
10747
  computedAt: IsoDateTimeSchema
10518
10748
  }).strict();
10519
- var RadarOpportunityMatrixPointSchema = z12.object({
10749
+ var RadarOpportunityMatrixPointSchema = z13.object({
10520
10750
  subjectRef: EntityRefSchema,
10521
- label: z12.string().trim().min(1),
10522
- x: z12.number().finite(),
10523
- y: z12.number().finite(),
10524
- score: z12.number().finite(),
10525
- evidenceRefs: z12.array(EntityRefSchema).default([])
10751
+ label: z13.string().trim().min(1),
10752
+ x: z13.number().finite(),
10753
+ y: z13.number().finite(),
10754
+ score: z13.number().finite(),
10755
+ evidenceRefs: z13.array(EntityRefSchema).default([])
10526
10756
  }).strict();
10527
- var RadarOpportunityMatrixSchema = z12.object({
10528
- contract: z12.literal("RadarOpportunityMatrix"),
10529
- xMetric: z12.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10530
- yMetric: z12.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10531
- points: z12.array(RadarOpportunityMatrixPointSchema),
10757
+ var RadarOpportunityMatrixSchema = z13.object({
10758
+ contract: z13.literal("RadarOpportunityMatrix"),
10759
+ xMetric: z13.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10760
+ yMetric: z13.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10761
+ points: z13.array(RadarOpportunityMatrixPointSchema),
10532
10762
  computedAt: IsoDateTimeSchema
10533
10763
  }).strict();
10534
- var RadarQueryBodySchema = z12.object({
10535
- contract: z12.literal("RadarQueryBody"),
10764
+ var RadarQueryBodySchema = z13.object({
10765
+ contract: z13.literal("RadarQueryBody"),
10536
10766
  queryId: ContractIdentifierSchema,
10537
- filters: z12.record(z12.string(), JsonValueSchema).default({}),
10538
- sort: z12.object({
10767
+ filters: z13.record(z13.string(), JsonValueSchema).default({}),
10768
+ sort: z13.object({
10539
10769
  field: ContractIdentifierSchema,
10540
- direction: z12.enum(["asc", "desc"])
10770
+ direction: z13.enum(["asc", "desc"])
10541
10771
  }).strict(),
10542
- pageSize: z12.number().int().min(1).max(200),
10772
+ pageSize: z13.number().int().min(1).max(200),
10543
10773
  updatedAt: IsoDateTimeSchema
10544
10774
  }).strict();
10545
- var SavedRadarQuerySchema = z12.object({
10546
- contract: z12.literal("SavedRadarQuery"),
10775
+ var SavedRadarQuerySchema = z13.object({
10776
+ contract: z13.literal("SavedRadarQuery"),
10547
10777
  savedQueryId: ContractIdentifierSchema,
10548
10778
  teamId: ContractIdentifierSchema,
10549
10779
  ownerRef: EntityRefSchema,
10550
- name: z12.string().trim().min(1),
10780
+ name: z13.string().trim().min(1),
10551
10781
  queryRef: EntityRefSchema,
10552
- expectedVersion: z12.number().int().nonnegative(),
10782
+ expectedVersion: z13.number().int().nonnegative(),
10553
10783
  updatedAt: IsoDateTimeSchema
10554
10784
  }).strict();
10555
- var RadarSelectionSchema = z12.object({
10556
- contract: z12.literal("RadarSelection"),
10785
+ var RadarSelectionSchema = z13.object({
10786
+ contract: z13.literal("RadarSelection"),
10557
10787
  selectionId: ContractIdentifierSchema,
10558
10788
  teamId: ContractIdentifierSchema,
10559
10789
  ownerRef: EntityRefSchema,
10560
- subjectRefs: z12.array(EntityRefSchema),
10561
- status: z12.enum(["stashed", "selected", "rejected", "archived"]),
10562
- note: z12.string().optional(),
10563
- expectedVersion: z12.number().int().nonnegative(),
10790
+ subjectRefs: z13.array(EntityRefSchema),
10791
+ status: z13.enum(["stashed", "selected", "rejected", "archived"]),
10792
+ note: z13.string().optional(),
10793
+ expectedVersion: z13.number().int().nonnegative(),
10564
10794
  updatedAt: IsoDateTimeSchema
10565
10795
  }).strict();
10566
- var RadarAnalysisRunSchema = z12.object({
10567
- contract: z12.literal("RadarAnalysisRun"),
10796
+ var RadarAnalysisRunSchema = z13.object({
10797
+ contract: z13.literal("RadarAnalysisRun"),
10568
10798
  runId: ContractIdentifierSchema,
10569
10799
  teamId: ContractIdentifierSchema,
10570
10800
  selectionRef: EntityRefSchema,
@@ -10573,66 +10803,66 @@ var RadarAnalysisRunSchema = z12.object({
10573
10803
  designProjectRef: EntityRefSchema.optional(),
10574
10804
  replayedFromRef: EntityRefSchema.optional(),
10575
10805
  workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
10576
- workflowInput: z12.record(z12.string(), JsonValueSchema).default({}),
10577
- createDesignProject: z12.boolean().default(true),
10578
- designProjectName: z12.string().trim().min(1).max(200).optional(),
10806
+ workflowInput: z13.record(z13.string(), JsonValueSchema).default({}),
10807
+ createDesignProject: z13.boolean().default(true),
10808
+ designProjectName: z13.string().trim().min(1).max(200).optional(),
10579
10809
  modelRef: EntityRefSchema,
10580
10810
  requestId: ContractIdentifierSchema,
10581
10811
  idempotencyKey: ContractIdentifierSchema,
10582
- status: z12.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
10583
- outputRefs: z12.array(EntityRefSchema).default([]),
10584
- error: z12.object({
10812
+ status: z13.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
10813
+ outputRefs: z13.array(EntityRefSchema).default([]),
10814
+ error: z13.object({
10585
10815
  code: ContractIdentifierSchema,
10586
- message: z12.string().trim().min(1),
10587
- retryable: z12.boolean()
10816
+ message: z13.string().trim().min(1),
10817
+ retryable: z13.boolean()
10588
10818
  }).strict().optional(),
10589
10819
  startedAt: IsoDateTimeSchema.optional(),
10590
10820
  completedAt: IsoDateTimeSchema.optional(),
10591
10821
  createdAt: IsoDateTimeSchema
10592
10822
  }).strict();
10593
- var RadarAnalysisAssetSchema = z12.object({
10823
+ var RadarAnalysisAssetSchema = z13.object({
10594
10824
  artifactRef: EntityRefSchema,
10595
10825
  kind: ContractIdentifierSchema,
10596
- mimeType: z12.string().trim().min(1).optional(),
10597
- url: z12.string().url(),
10598
- metadata: z12.record(z12.string(), JsonValueSchema).default({}),
10826
+ mimeType: z13.string().trim().min(1).optional(),
10827
+ url: z13.string().url(),
10828
+ metadata: z13.record(z13.string(), JsonValueSchema).default({}),
10599
10829
  createdAt: IsoDateTimeSchema
10600
10830
  }).strict();
10601
- var RadarAnalysisDetailSchema = z12.object({
10602
- contract: z12.literal("RadarAnalysisDetail"),
10831
+ var RadarAnalysisDetailSchema = z13.object({
10832
+ contract: z13.literal("RadarAnalysisDetail"),
10603
10833
  run: RadarAnalysisRunSchema,
10604
- runVersion: z12.number().int().positive(),
10834
+ runVersion: z13.number().int().positive(),
10605
10835
  selection: RadarSelectionSchema,
10606
- outputs: z12.array(OutputRecordSchema),
10607
- assets: z12.array(RadarAnalysisAssetSchema),
10608
- lineage: z12.array(LineageRecordSchema)
10836
+ outputs: z13.array(OutputRecordSchema),
10837
+ assets: z13.array(RadarAnalysisAssetSchema),
10838
+ lineage: z13.array(LineageRecordSchema)
10609
10839
  }).strict();
10610
- var RadarActionRecordSchema = z12.object({
10611
- contract: z12.literal("RadarActionRecord"),
10840
+ var RadarActionRecordSchema = z13.object({
10841
+ contract: z13.literal("RadarActionRecord"),
10612
10842
  actionId: ContractIdentifierSchema,
10613
10843
  teamId: ContractIdentifierSchema,
10614
10844
  actorRef: EntityRefSchema,
10615
- action: z12.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
10845
+ action: z13.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
10616
10846
  targetRef: EntityRefSchema,
10617
10847
  requestId: ContractIdentifierSchema,
10618
10848
  idempotencyKey: ContractIdentifierSchema,
10619
- expectedVersion: z12.number().int().nonnegative(),
10849
+ expectedVersion: z13.number().int().nonnegative(),
10620
10850
  occurredAt: IsoDateTimeSchema
10621
10851
  }).strict();
10622
- var RadarWritebackRecordSchema = z12.object({
10623
- contract: z12.literal("RadarWritebackRecord"),
10852
+ var RadarWritebackRecordSchema = z13.object({
10853
+ contract: z13.literal("RadarWritebackRecord"),
10624
10854
  writebackId: ContractIdentifierSchema,
10625
10855
  actionRef: EntityRefSchema,
10626
10856
  targetRef: EntityRefSchema,
10627
- status: z12.enum(["PENDING", "APPLIED", "FAILED"]),
10628
- resultingVersion: z12.number().int().nonnegative().optional(),
10629
- error: z12.string().trim().min(1).optional(),
10857
+ status: z13.enum(["PENDING", "APPLIED", "FAILED"]),
10858
+ resultingVersion: z13.number().int().nonnegative().optional(),
10859
+ error: z13.string().trim().min(1).optional(),
10630
10860
  recordedAt: IsoDateTimeSchema
10631
10861
  }).strict();
10632
10862
 
10633
10863
  // src/contracts/workflow-definition.ts
10634
- import { z as z13 } from "zod";
10635
- var ConductorTaskTypeSchema = z13.enum([
10864
+ import { z as z14 } from "zod";
10865
+ var ConductorTaskTypeSchema = z14.enum([
10636
10866
  "SIMPLE",
10637
10867
  "DYNAMIC",
10638
10868
  "FORK_JOIN",
@@ -10681,46 +10911,46 @@ var requiredTaskFields = {
10681
10911
  WAIT: ["inputParameters"],
10682
10912
  TERMINATE: ["inputParameters"]
10683
10913
  };
10684
- var ConductorTaskDefinitionSchema = z13.lazy(
10685
- () => z13.object({
10914
+ var ConductorTaskDefinitionSchema = z14.lazy(
10915
+ () => z14.object({
10686
10916
  name: ContractIdentifierSchema,
10687
10917
  taskReferenceName: ContractIdentifierSchema,
10688
10918
  type: ConductorTaskTypeSchema,
10689
- inputParameters: z13.record(z13.string(), JsonValueSchema).optional(),
10690
- startDelay: z13.number().int().nonnegative().optional(),
10691
- optional: z13.boolean().optional(),
10692
- asyncComplete: z13.boolean().optional(),
10693
- rateLimited: z13.boolean().optional(),
10694
- retryCount: z13.number().int().nonnegative().optional(),
10695
- taskDefinition: z13.record(z13.string(), JsonValueSchema).optional(),
10696
- loopCondition: z13.string().optional(),
10697
- loopOver: z13.array(ConductorTaskDefinitionSchema).optional(),
10698
- sink: z13.string().optional(),
10699
- forkTasks: z13.array(z13.array(ConductorTaskDefinitionSchema)).optional(),
10700
- joinOn: z13.array(ContractIdentifierSchema).optional(),
10701
- defaultExclusiveJoinTask: z13.array(ContractIdentifierSchema).optional(),
10702
- dynamicForkTasksParam: z13.string().optional(),
10703
- dynamicForkTasksInputParamName: z13.string().optional(),
10704
- subWorkflowParam: z13.object({
10705
- $ref: z13.string().optional(),
10919
+ inputParameters: z14.record(z14.string(), JsonValueSchema).optional(),
10920
+ startDelay: z14.number().int().nonnegative().optional(),
10921
+ optional: z14.boolean().optional(),
10922
+ asyncComplete: z14.boolean().optional(),
10923
+ rateLimited: z14.boolean().optional(),
10924
+ retryCount: z14.number().int().nonnegative().optional(),
10925
+ taskDefinition: z14.record(z14.string(), JsonValueSchema).optional(),
10926
+ loopCondition: z14.string().optional(),
10927
+ loopOver: z14.array(ConductorTaskDefinitionSchema).optional(),
10928
+ sink: z14.string().optional(),
10929
+ forkTasks: z14.array(z14.array(ConductorTaskDefinitionSchema)).optional(),
10930
+ joinOn: z14.array(ContractIdentifierSchema).optional(),
10931
+ defaultExclusiveJoinTask: z14.array(ContractIdentifierSchema).optional(),
10932
+ dynamicForkTasksParam: z14.string().optional(),
10933
+ dynamicForkTasksInputParamName: z14.string().optional(),
10934
+ subWorkflowParam: z14.object({
10935
+ $ref: z14.string().optional(),
10706
10936
  name: ContractIdentifierSchema,
10707
- version: z13.number().int().positive().optional(),
10708
- taskToDomain: z13.record(z13.string(), z13.string()).optional(),
10709
- workflowDefinition: z13.record(z13.string(), JsonValueSchema).optional()
10937
+ version: z14.number().int().positive().optional(),
10938
+ taskToDomain: z14.record(z14.string(), z14.string()).optional(),
10939
+ workflowDefinition: z14.record(z14.string(), JsonValueSchema).optional()
10710
10940
  }).strict().optional(),
10711
- decisionCases: z13.record(z13.string(), z13.array(ConductorTaskDefinitionSchema)).optional(),
10712
- defaultCase: z13.array(ConductorTaskDefinitionSchema).optional(),
10713
- evaluatorType: z13.enum(["value-param", "javascript", "graaljs"]).optional(),
10714
- expression: z13.string().optional(),
10941
+ decisionCases: z14.record(z14.string(), z14.array(ConductorTaskDefinitionSchema)).optional(),
10942
+ defaultCase: z14.array(ConductorTaskDefinitionSchema).optional(),
10943
+ evaluatorType: z14.enum(["value-param", "javascript", "graaljs"]).optional(),
10944
+ expression: z14.string().optional(),
10715
10945
  __alias: JsonValueSchema.optional(),
10716
- callbackFromWorker: z13.boolean().optional(),
10946
+ callbackFromWorker: z14.boolean().optional(),
10717
10947
  caseExpression: JsonValueSchema.optional(),
10718
- caseValueParam: z13.string().optional(),
10719
- dependencies: z13.array(JsonValueSchema).optional(),
10720
- description: z13.string().optional(),
10721
- dynamicTaskNameParam: z13.string().optional(),
10722
- joinMode: z13.string().optional(),
10723
- permissive: z13.boolean().optional(),
10948
+ caseValueParam: z14.string().optional(),
10949
+ dependencies: z14.array(JsonValueSchema).optional(),
10950
+ description: z14.string().optional(),
10951
+ dynamicTaskNameParam: z14.string().optional(),
10952
+ joinMode: z14.string().optional(),
10953
+ permissive: z14.boolean().optional(),
10724
10954
  joinTaskRef: ContractIdentifierSchema.optional(),
10725
10955
  forkTaskRef: ContractIdentifierSchema.optional()
10726
10956
  }).strict().superRefine((task, context) => {
@@ -10734,29 +10964,29 @@ var ConductorTaskDefinitionSchema = z13.lazy(
10734
10964
  }
10735
10965
  })
10736
10966
  );
10737
- var ConductorWorkflowDefinitionSchema = z13.object({
10738
- ownerApp: z13.string().optional(),
10739
- createTime: z13.number().int().nonnegative().optional(),
10740
- updateTime: z13.number().int().nonnegative().optional(),
10741
- createdBy: z13.string().optional(),
10742
- updatedBy: z13.string().optional(),
10967
+ var ConductorWorkflowDefinitionSchema = z14.object({
10968
+ ownerApp: z14.string().optional(),
10969
+ createTime: z14.number().int().nonnegative().optional(),
10970
+ updateTime: z14.number().int().nonnegative().optional(),
10971
+ createdBy: z14.string().optional(),
10972
+ updatedBy: z14.string().optional(),
10743
10973
  name: ContractIdentifierSchema,
10744
- description: z13.string().optional(),
10745
- version: z13.number().int().positive(),
10746
- tasks: z13.array(ConductorTaskDefinitionSchema),
10747
- inputParameters: z13.array(ContractIdentifierSchema),
10748
- outputParameters: z13.record(z13.string(), JsonValueSchema).optional(),
10974
+ description: z14.string().optional(),
10975
+ version: z14.number().int().positive(),
10976
+ tasks: z14.array(ConductorTaskDefinitionSchema),
10977
+ inputParameters: z14.array(ContractIdentifierSchema),
10978
+ outputParameters: z14.record(z14.string(), JsonValueSchema).optional(),
10749
10979
  failureWorkflow: ContractIdentifierSchema.optional(),
10750
- schemaVersion: z13.number().int().positive().optional(),
10751
- restartable: z13.boolean().optional(),
10752
- workflowStatusListenerEnabled: z13.boolean().optional(),
10753
- ownerEmail: z13.string().email().optional(),
10754
- timeoutPolicy: z13.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
10755
- timeoutSeconds: z13.number().int().nonnegative(),
10756
- variables: z13.record(z13.string(), JsonValueSchema).optional(),
10757
- inputTemplate: z13.record(z13.string(), JsonValueSchema).optional()
10980
+ schemaVersion: z14.number().int().positive().optional(),
10981
+ restartable: z14.boolean().optional(),
10982
+ workflowStatusListenerEnabled: z14.boolean().optional(),
10983
+ ownerEmail: z14.string().email().optional(),
10984
+ timeoutPolicy: z14.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
10985
+ timeoutSeconds: z14.number().int().nonnegative(),
10986
+ variables: z14.record(z14.string(), JsonValueSchema).optional(),
10987
+ inputTemplate: z14.record(z14.string(), JsonValueSchema).optional()
10758
10988
  }).strict();
10759
- var WorkflowParameterTypeSchema = z13.enum([
10989
+ var WorkflowParameterTypeSchema = z14.enum([
10760
10990
  "string",
10761
10991
  "file",
10762
10992
  "number",
@@ -10766,213 +10996,213 @@ var WorkflowParameterTypeSchema = z13.enum([
10766
10996
  "notice",
10767
10997
  "canvas-assist"
10768
10998
  ]);
10769
- var WorkflowConditionalStateSchema = z13.object({
10770
- conditions: z13.array(
10771
- z13.object({
10772
- field: z13.string(),
10773
- operator: z13.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
10999
+ var WorkflowConditionalStateSchema = z14.object({
11000
+ conditions: z14.array(
11001
+ z14.object({
11002
+ field: z14.string(),
11003
+ operator: z14.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
10774
11004
  value: JsonValueSchema
10775
11005
  }).strict()
10776
11006
  ),
10777
- logic: z13.enum(["AND", "OR"]).optional()
11007
+ logic: z14.enum(["AND", "OR"]).optional()
10778
11008
  }).strict();
10779
- var ImageSelectMappingAppearanceSchema = z13.object({
10780
- columns: z13.number().int().min(1).max(4).optional(),
10781
- cardSize: z13.enum(["sm", "md", "lg"]).optional(),
10782
- imageAspectRatio: z13.enum(["square", "4:5", "3:4", "16:9"]).optional(),
10783
- gap: z13.enum(["sm", "md", "lg"]).optional(),
10784
- radius: z13.enum(["sm", "md", "lg", "xl"]).optional(),
10785
- borderStyle: z13.enum(["none", "soft", "strong"]).optional(),
10786
- borderWidth: z13.union([z13.literal(0), z13.literal(1), z13.literal(2)]).optional(),
10787
- enableScroll: z13.boolean().optional(),
10788
- maxHeight: z13.number().int().min(160).max(1200).optional(),
10789
- enableCollapse: z13.boolean().optional(),
10790
- visibleRows: z13.number().int().min(1).max(6).optional(),
10791
- hideLabel: z13.boolean().optional(),
10792
- hideDescription: z13.boolean().optional(),
10793
- hideValue: z13.boolean().optional()
11009
+ var ImageSelectMappingAppearanceSchema = z14.object({
11010
+ columns: z14.number().int().min(1).max(4).optional(),
11011
+ cardSize: z14.enum(["sm", "md", "lg"]).optional(),
11012
+ imageAspectRatio: z14.enum(["square", "4:5", "3:4", "16:9"]).optional(),
11013
+ gap: z14.enum(["sm", "md", "lg"]).optional(),
11014
+ radius: z14.enum(["sm", "md", "lg", "xl"]).optional(),
11015
+ borderStyle: z14.enum(["none", "soft", "strong"]).optional(),
11016
+ borderWidth: z14.union([z14.literal(0), z14.literal(1), z14.literal(2)]).optional(),
11017
+ enableScroll: z14.boolean().optional(),
11018
+ maxHeight: z14.number().int().min(160).max(1200).optional(),
11019
+ enableCollapse: z14.boolean().optional(),
11020
+ visibleRows: z14.number().int().min(1).max(6).optional(),
11021
+ hideLabel: z14.boolean().optional(),
11022
+ hideDescription: z14.boolean().optional(),
11023
+ hideValue: z14.boolean().optional()
10794
11024
  }).strict();
10795
- var ComfyWorkflowPortBindingSchema = z13.object({
10796
- node: z13.union([z13.string(), z13.number()]),
10797
- key: z13.string().optional()
11025
+ var ComfyWorkflowPortBindingSchema = z14.object({
11026
+ node: z14.union([z14.string(), z14.number()]),
11027
+ key: z14.string().optional()
10798
11028
  }).strict();
10799
- var WorkflowParameterTypeOptionsSchema = z13.object({
10800
- editor: z13.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
10801
- editorLanguage: z13.enum(["javaScript", "json", "python", "sql"]).optional(),
10802
- maxValue: z13.number().optional(),
10803
- minValue: z13.number().optional(),
10804
- max: z13.number().optional(),
10805
- min: z13.number().optional(),
10806
- multipleValues: z13.boolean().optional(),
10807
- numberPrecision: z13.number().nonnegative().optional(),
10808
- password: z13.boolean().optional(),
10809
- rows: z13.number().int().positive().optional(),
10810
- assetType: z13.string().optional(),
10811
- accept: z13.string().optional(),
10812
- maxSize: z13.number().positive().optional(),
10813
- fileType: z13.string().optional(),
10814
- aiMultiShotMainImageField: z13.string().optional(),
10815
- aiMultiShotWorkflowAppId: z13.string().optional(),
10816
- aiMultiShotWorkflowId: z13.string().optional(),
10817
- allowCustomInput: z13.boolean().optional(),
10818
- allowUploadVideo: z13.boolean().optional(),
10819
- aspectRatioField: z13.string().optional(),
10820
- assemblyValueType: z13.string().optional(),
10821
- autoAnalyzeDesignImage: z13.boolean().optional(),
10822
- autoDetectAspectRatio: z13.boolean().optional(),
10823
- autoIncrementId: z13.boolean().optional(),
11029
+ var WorkflowParameterTypeOptionsSchema = z14.object({
11030
+ editor: z14.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
11031
+ editorLanguage: z14.enum(["javaScript", "json", "python", "sql"]).optional(),
11032
+ maxValue: z14.number().optional(),
11033
+ minValue: z14.number().optional(),
11034
+ max: z14.number().optional(),
11035
+ min: z14.number().optional(),
11036
+ multipleValues: z14.boolean().optional(),
11037
+ numberPrecision: z14.number().nonnegative().optional(),
11038
+ password: z14.boolean().optional(),
11039
+ rows: z14.number().int().positive().optional(),
11040
+ assetType: z14.string().optional(),
11041
+ accept: z14.string().optional(),
11042
+ maxSize: z14.number().positive().optional(),
11043
+ fileType: z14.string().optional(),
11044
+ aiMultiShotMainImageField: z14.string().optional(),
11045
+ aiMultiShotWorkflowAppId: z14.string().optional(),
11046
+ aiMultiShotWorkflowId: z14.string().optional(),
11047
+ allowCustomInput: z14.boolean().optional(),
11048
+ allowUploadVideo: z14.boolean().optional(),
11049
+ aspectRatioField: z14.string().optional(),
11050
+ assemblyValueType: z14.string().optional(),
11051
+ autoAnalyzeDesignImage: z14.boolean().optional(),
11052
+ autoDetectAspectRatio: z14.boolean().optional(),
11053
+ autoIncrementId: z14.boolean().optional(),
10824
11054
  comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
10825
- comfyuiModelServerId: z13.string().optional(),
10826
- comfyuiModelTypeName: z13.string().optional(),
11055
+ comfyuiModelServerId: z14.string().optional(),
11056
+ comfyuiModelTypeName: z14.string().optional(),
10827
11057
  defaultCustomInput: JsonValueSchema.optional(),
10828
- descriptionAlert: z13.boolean().optional(),
10829
- disabled: z13.union([z13.boolean(), WorkflowConditionalStateSchema]).optional(),
10830
- editable: z13.union([z13.boolean(), WorkflowConditionalStateSchema]).optional(),
10831
- enableAiMultiShot: z13.boolean().optional(),
10832
- enableBooleanSwitchMode: z13.boolean().optional(),
10833
- enableClear: z13.boolean().optional(),
10834
- enableExpand: z13.boolean().optional(),
10835
- enableImageMask: z13.boolean().optional(),
10836
- enableImageOverlay: z13.boolean().optional(),
10837
- enablePopupEditor: z13.boolean().optional(),
10838
- enablePromptFontSize: z13.boolean().optional(),
10839
- enableReset: z13.boolean().optional(),
10840
- enableSelectItemIcon: z13.boolean().optional(),
10841
- enableSelectList: z13.boolean().optional(),
10842
- enableSelectSearch: z13.boolean().optional(),
10843
- enableSliderEnterMode: z13.boolean().optional(),
10844
- enableVoice: z13.boolean().optional(),
10845
- expandButtonText: z13.string().optional(),
10846
- foldUp: z13.boolean().optional(),
10847
- hidden: z13.boolean().optional(),
10848
- hideRequiredDot: z13.boolean().optional(),
10849
- inlineTitleWithSelect: z13.boolean().optional(),
10850
- knowledgeGraphButtonText: z13.string().optional(),
10851
- identifyAttributeCount: z13.union([z13.number().nonnegative(), z13.string().min(1), z13.object({ min: z13.number().nonnegative().optional(), max: z13.number().nonnegative().optional() }).strict()]).optional(),
10852
- identifyAttributes: z13.array(JsonValueSchema).optional(),
10853
- identifyMaxVariants: z13.number().int().nonnegative().optional(),
10854
- identifySourceField: z13.string().optional(),
10855
- imageOverlayBaseField: z13.string().optional(),
10856
- imageOverlayOverlayField: z13.string().optional(),
11058
+ descriptionAlert: z14.boolean().optional(),
11059
+ disabled: z14.union([z14.boolean(), WorkflowConditionalStateSchema]).optional(),
11060
+ editable: z14.union([z14.boolean(), WorkflowConditionalStateSchema]).optional(),
11061
+ enableAiMultiShot: z14.boolean().optional(),
11062
+ enableBooleanSwitchMode: z14.boolean().optional(),
11063
+ enableClear: z14.boolean().optional(),
11064
+ enableExpand: z14.boolean().optional(),
11065
+ enableImageMask: z14.boolean().optional(),
11066
+ enableImageOverlay: z14.boolean().optional(),
11067
+ enablePopupEditor: z14.boolean().optional(),
11068
+ enablePromptFontSize: z14.boolean().optional(),
11069
+ enableReset: z14.boolean().optional(),
11070
+ enableSelectItemIcon: z14.boolean().optional(),
11071
+ enableSelectList: z14.boolean().optional(),
11072
+ enableSelectSearch: z14.boolean().optional(),
11073
+ enableSliderEnterMode: z14.boolean().optional(),
11074
+ enableVoice: z14.boolean().optional(),
11075
+ expandButtonText: z14.string().optional(),
11076
+ foldUp: z14.boolean().optional(),
11077
+ hidden: z14.boolean().optional(),
11078
+ hideRequiredDot: z14.boolean().optional(),
11079
+ inlineTitleWithSelect: z14.boolean().optional(),
11080
+ knowledgeGraphButtonText: z14.string().optional(),
11081
+ identifyAttributeCount: z14.union([z14.number().nonnegative(), z14.string().min(1), z14.object({ min: z14.number().nonnegative().optional(), max: z14.number().nonnegative().optional() }).strict()]).optional(),
11082
+ identifyAttributes: z14.array(JsonValueSchema).optional(),
11083
+ identifyMaxVariants: z14.number().int().nonnegative().optional(),
11084
+ identifySourceField: z14.string().optional(),
11085
+ imageOverlayBaseField: z14.string().optional(),
11086
+ imageOverlayOverlayField: z14.string().optional(),
10857
11087
  imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
10858
- imageSelectMappingColumns: z13.number().int().min(1).max(4).optional(),
10859
- imageSelectMappingEnableCustomUpload: z13.boolean().optional(),
10860
- imageSelectMappingHideLabel: z13.boolean().optional(),
10861
- imageSelectMappingHideLink: z13.boolean().optional(),
10862
- imageSelectMappingHideMeta: z13.boolean().optional(),
10863
- imageSelectMappingInlineUseLargeUploadBox: z13.boolean().optional(),
10864
- imageSelectMappingPromptField: z13.string().optional(),
10865
- imageSelectMappingTabOrder: z13.enum(["template-first", "upload-first"]).optional(),
10866
- imageSelectMappingTabWidthMode: z13.enum(["content", "fill"]).optional(),
11088
+ imageSelectMappingColumns: z14.number().int().min(1).max(4).optional(),
11089
+ imageSelectMappingEnableCustomUpload: z14.boolean().optional(),
11090
+ imageSelectMappingHideLabel: z14.boolean().optional(),
11091
+ imageSelectMappingHideLink: z14.boolean().optional(),
11092
+ imageSelectMappingHideMeta: z14.boolean().optional(),
11093
+ imageSelectMappingInlineUseLargeUploadBox: z14.boolean().optional(),
11094
+ imageSelectMappingPromptField: z14.string().optional(),
11095
+ imageSelectMappingTabOrder: z14.enum(["template-first", "upload-first"]).optional(),
11096
+ imageSelectMappingTabWidthMode: z14.enum(["content", "fill"]).optional(),
10867
11097
  imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
10868
11098
  imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
10869
- imageSelectMappingUploadMode: z13.enum(["tabs", "inline"]).optional(),
11099
+ imageSelectMappingUploadMode: z14.enum(["tabs", "inline"]).optional(),
10870
11100
  imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
10871
11101
  imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
10872
- endpoints: z13.array(JsonValueSchema).optional(),
10873
- examples: z13.array(JsonValueSchema).optional(),
11102
+ endpoints: z14.array(JsonValueSchema).optional(),
11103
+ examples: z14.array(JsonValueSchema).optional(),
10874
11104
  extraData: JsonValueSchema.optional(),
10875
11105
  layer: JsonValueSchema.optional(),
10876
11106
  map: JsonValueSchema.optional(),
10877
- multiline: z13.boolean().optional(),
10878
- options: z13.array(JsonValueSchema).optional(),
10879
- originalFiles: z13.array(JsonValueSchema).optional(),
11107
+ multiline: z14.boolean().optional(),
11108
+ options: z14.array(JsonValueSchema).optional(),
11109
+ originalFiles: z14.array(JsonValueSchema).optional(),
10880
11110
  placeholder: LocalizedTextSchema.optional(),
10881
- preserveSelectListOrder: z13.boolean().optional(),
11111
+ preserveSelectListOrder: z14.boolean().optional(),
10882
11112
  promptDictionary: JsonValueSchema.optional(),
10883
- promptFontSize: z13.number().optional(),
11113
+ promptFontSize: z14.number().optional(),
10884
11114
  promptModeToggle: JsonValueSchema.optional(),
10885
- requireActiveSelectFilter: z13.boolean().optional(),
10886
- restoreDefaultOnEmptyEnter: z13.boolean().optional(),
10887
- search: z13.boolean().optional(),
10888
- selectButtonEnableCollapse: z13.boolean().optional(),
10889
- selectButtonVisibleRows: z13.number().int().positive().optional(),
10890
- selectList: z13.array(JsonValueSchema).optional(),
10891
- selectListDisplayMode: z13.string().optional(),
10892
- selectPromptField: z13.string().optional(),
10893
- showAddLocalFileButton: z13.boolean().optional(),
10894
- singleColumn: z13.boolean().optional(),
10895
- singleFrameForMultiple: z13.boolean().optional(),
10896
- textSingleLine: z13.boolean().optional(),
10897
- textareaMiniHeight: z13.number().nonnegative().optional(),
11115
+ requireActiveSelectFilter: z14.boolean().optional(),
11116
+ restoreDefaultOnEmptyEnter: z14.boolean().optional(),
11117
+ search: z14.boolean().optional(),
11118
+ selectButtonEnableCollapse: z14.boolean().optional(),
11119
+ selectButtonVisibleRows: z14.number().int().positive().optional(),
11120
+ selectList: z14.array(JsonValueSchema).optional(),
11121
+ selectListDisplayMode: z14.string().optional(),
11122
+ selectPromptField: z14.string().optional(),
11123
+ showAddLocalFileButton: z14.boolean().optional(),
11124
+ singleColumn: z14.boolean().optional(),
11125
+ singleFrameForMultiple: z14.boolean().optional(),
11126
+ textSingleLine: z14.boolean().optional(),
11127
+ textareaMiniHeight: z14.number().nonnegative().optional(),
10898
11128
  tips: LocalizedTextSchema.optional(),
10899
11129
  visibility: JsonValueSchema.optional(),
10900
- voiceButtonText: z13.string().optional(),
10901
- designAnalysisFields: z13.array(JsonValueSchema).optional(),
10902
- designAnalysisFillStrategy: z13.string().optional(),
10903
- designAnalysisMaxFields: z13.number().int().nonnegative().optional(),
10904
- designAnalysisType: z13.string().optional(),
10905
- designAnalysisFieldPrefix: z13.string().optional()
11130
+ voiceButtonText: z14.string().optional(),
11131
+ designAnalysisFields: z14.array(JsonValueSchema).optional(),
11132
+ designAnalysisFillStrategy: z14.string().optional(),
11133
+ designAnalysisMaxFields: z14.number().int().nonnegative().optional(),
11134
+ designAnalysisType: z14.string().optional(),
11135
+ designAnalysisFieldPrefix: z14.string().optional()
10906
11136
  }).strict();
10907
- var WorkflowParameterSchema = z13.lazy(
10908
- () => z13.object({
11137
+ var WorkflowParameterSchema = z14.lazy(
11138
+ () => z14.object({
10909
11139
  displayName: LocalizedTextSchema,
10910
11140
  name: ContractIdentifierSchema,
10911
11141
  type: WorkflowParameterTypeSchema,
10912
11142
  typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
10913
11143
  default: JsonValueSchema.optional(),
10914
11144
  description: LocalizedTextSchema.optional(),
10915
- hint: z13.string().optional(),
10916
- displayOptions: z13.object({
10917
- hide: z13.record(z13.string(), z13.array(JsonValueSchema)).optional(),
10918
- show: z13.record(z13.string(), z13.array(JsonValueSchema)).optional()
11145
+ hint: z14.string().optional(),
11146
+ displayOptions: z14.object({
11147
+ hide: z14.record(z14.string(), z14.array(JsonValueSchema)).optional(),
11148
+ show: z14.record(z14.string(), z14.array(JsonValueSchema)).optional()
10919
11149
  }).strict().optional(),
10920
- options: z13.array(z13.union([
10921
- z13.object({ name: LocalizedTextSchema, value: z13.union([z13.string(), z13.number(), z13.boolean()]), action: z13.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
11150
+ options: z14.array(z14.union([
11151
+ z14.object({ name: LocalizedTextSchema, value: z14.union([z14.string(), z14.number(), z14.boolean()]), action: z14.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
10922
11152
  WorkflowParameterSchema,
10923
- z13.object({ displayName: z13.string(), name: ContractIdentifierSchema, values: z13.array(WorkflowParameterSchema) }).strict()
11153
+ z14.object({ displayName: z14.string(), name: ContractIdentifierSchema, values: z14.array(WorkflowParameterSchema) }).strict()
10924
11154
  ])).optional(),
10925
11155
  placeholder: LocalizedTextSchema.optional(),
10926
- isNodeSetting: z13.boolean().optional(),
10927
- noDataExpression: z13.boolean().optional(),
10928
- required: z13.boolean().optional(),
10929
- example: z13.string().optional(),
10930
- extractValue: z13.object({ type: z13.literal("regex"), regex: z13.string() }).strict().optional(),
10931
- properties: z13.array(WorkflowParameterSchema).optional(),
10932
- assetType: z13.string().optional(),
10933
- flag: z13.boolean().optional(),
10934
- enableExpand: z13.boolean().optional(),
10935
- enableVoice: z13.boolean().optional(),
10936
- expandButtonText: z13.string().optional(),
10937
- knowledgeGraphButtonText: z13.string().optional(),
10938
- selectListDisplayMode: z13.string().optional(),
10939
- voiceButtonText: z13.string().optional()
11156
+ isNodeSetting: z14.boolean().optional(),
11157
+ noDataExpression: z14.boolean().optional(),
11158
+ required: z14.boolean().optional(),
11159
+ example: z14.string().optional(),
11160
+ extractValue: z14.object({ type: z14.literal("regex"), regex: z14.string() }).strict().optional(),
11161
+ properties: z14.array(WorkflowParameterSchema).optional(),
11162
+ assetType: z14.string().optional(),
11163
+ flag: z14.boolean().optional(),
11164
+ enableExpand: z14.boolean().optional(),
11165
+ enableVoice: z14.boolean().optional(),
11166
+ expandButtonText: z14.string().optional(),
11167
+ knowledgeGraphButtonText: z14.string().optional(),
11168
+ selectListDisplayMode: z14.string().optional(),
11169
+ voiceButtonText: z14.string().optional()
10940
11170
  }).strict()
10941
11171
  );
10942
- var WorkflowOutputBindingSchema = z13.object({ key: ContractIdentifierSchema, value: z13.string() }).strict();
10943
- var WorkflowNodeSchema = z13.object({
11172
+ var WorkflowOutputBindingSchema = z14.object({ key: ContractIdentifierSchema, value: z14.string() }).strict();
11173
+ var WorkflowNodeSchema = z14.object({
10944
11174
  id: ContractIdentifierSchema,
10945
11175
  referenceName: ContractIdentifierSchema,
10946
11176
  capabilityRef: ContractIdentifierSchema,
10947
11177
  capabilityVersion: ContractIdentifierSchema.optional(),
10948
- inputBindings: z13.record(z13.string(), JsonValueSchema).default({}),
10949
- configuration: z13.object({ executor: z13.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
11178
+ inputBindings: z14.record(z14.string(), JsonValueSchema).default({}),
11179
+ configuration: z14.object({ executor: z14.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
10950
11180
  }).strict().superRefine((node, context) => {
10951
11181
  if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
10952
11182
  if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
10953
11183
  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." });
10954
11184
  });
10955
- var WorkflowEdgeSchema = z13.object({
11185
+ var WorkflowEdgeSchema = z14.object({
10956
11186
  from: ContractIdentifierSchema,
10957
11187
  to: ContractIdentifierSchema,
10958
11188
  outputPort: ContractIdentifierSchema.optional(),
10959
11189
  inputPort: ContractIdentifierSchema.optional(),
10960
- condition: z13.string().optional()
11190
+ condition: z14.string().optional()
10961
11191
  }).strict();
10962
- var WorkflowTriggerSchema = z13.object({
11192
+ var WorkflowTriggerSchema = z14.object({
10963
11193
  id: ContractIdentifierSchema,
10964
- type: z13.enum(["manual", "schedule", "webhook", "event", "api"]),
10965
- enabled: z13.boolean(),
10966
- schedule: z13.object({ cron: z13.string().trim().min(1) }).strict().optional(),
10967
- webhook: z13.object({
10968
- path: z13.string().trim().min(1).optional(),
10969
- method: z13.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
10970
- auth: z13.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
10971
- basicAuth: z13.object({ username: z13.string(), password: z13.string() }).strict().optional(),
10972
- headerAuth: z13.object({ name: z13.string().trim().min(1), value: z13.string() }).strict().optional(),
10973
- responseUntil: z13.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
11194
+ type: z14.enum(["manual", "schedule", "webhook", "event", "api"]),
11195
+ enabled: z14.boolean(),
11196
+ schedule: z14.object({ cron: z14.string().trim().min(1) }).strict().optional(),
11197
+ webhook: z14.object({
11198
+ path: z14.string().trim().min(1).optional(),
11199
+ method: z14.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
11200
+ auth: z14.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
11201
+ basicAuth: z14.object({ username: z14.string(), password: z14.string() }).strict().optional(),
11202
+ headerAuth: z14.object({ name: z14.string().trim().min(1), value: z14.string() }).strict().optional(),
11203
+ responseUntil: z14.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
10974
11204
  }).strict().optional(),
10975
- event: z13.object({
11205
+ event: z14.object({
10976
11206
  eventType: ContractIdentifierSchema,
10977
11207
  configuration: JsonValueSchema.optional()
10978
11208
  }).strict().optional()
@@ -10981,63 +11211,63 @@ var WorkflowTriggerSchema = z13.object({
10981
11211
  if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
10982
11212
  if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
10983
11213
  });
10984
- var WorkflowValidationIssueSchema = z13.object({
11214
+ var WorkflowValidationIssueSchema = z14.object({
10985
11215
  taskReferenceName: ContractIdentifierSchema,
10986
- issueType: z13.enum(["ERROR", "WARNING"]),
10987
- detailReason: z13.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
10988
- humanMessage: z13.object({ en: z13.string(), zh: z13.string() }).strict()
11216
+ issueType: z14.enum(["ERROR", "WARNING"]),
11217
+ detailReason: z14.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
11218
+ humanMessage: z14.object({ en: z14.string(), zh: z14.string() }).strict()
10989
11219
  }).strict();
10990
- var WorkflowDefinitionSchema = z13.object({
10991
- contract: z13.literal("WorkflowDefinition"),
11220
+ var WorkflowDefinitionSchema = z14.object({
11221
+ contract: z14.literal("WorkflowDefinition"),
10992
11222
  metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
10993
11223
  name: LocalizedTextSchema,
10994
11224
  description: LocalizedTextSchema.optional(),
10995
- role: z13.enum(["workflow", "template"]),
11225
+ role: z14.enum(["workflow", "template"]),
10996
11226
  teamId: ContractIdentifierSchema,
10997
11227
  creatorRef: EntityRefSchema,
10998
- tags: z13.array(ContractIdentifierSchema).default([])
11228
+ tags: z14.array(ContractIdentifierSchema).default([])
10999
11229
  }).strict(),
11000
- revision: z13.object({
11001
- kind: z13.enum(["release", "backup"]),
11002
- recordVersion: z13.number().int().positive(),
11003
- sourceVersion: z13.number().int().positive().optional()
11230
+ revision: z14.object({
11231
+ kind: z14.enum(["release", "backup"]),
11232
+ recordVersion: z14.number().int().positive(),
11233
+ sourceVersion: z14.number().int().positive().optional()
11004
11234
  }).strict().superRefine((revision, context) => {
11005
11235
  if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
11006
11236
  }),
11007
- presentation: z13.object({ iconUrl: z13.string().optional(), thumbnail: z13.string().optional() }).strict(),
11008
- ports: z13.object({ inputs: z13.array(ContractPortSchema).default([]), outputs: z13.array(ContractPortSchema).default([]) }).strict(),
11009
- parameters: z13.object({ variables: z13.array(WorkflowParameterSchema).default([]), outputs: z13.array(WorkflowOutputBindingSchema).default([]) }).strict(),
11010
- graph: z13.object({ nodes: z13.array(WorkflowNodeSchema), edges: z13.array(WorkflowEdgeSchema).default([]) }).strict(),
11011
- execution: z13.object({
11012
- timeoutMs: z13.number().int().positive().optional(),
11013
- retries: z13.number().int().nonnegative().default(0),
11014
- concurrencyLimit: z13.number().int().positive().optional(),
11015
- idempotency: z13.enum(["required", "supported", "none"]),
11016
- rateLimit: z13.object({ enabled: z13.boolean(), max: z13.number().int().nonnegative(), windowMs: z13.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
11237
+ presentation: z14.object({ iconUrl: z14.string().optional(), thumbnail: z14.string().optional() }).strict(),
11238
+ ports: z14.object({ inputs: z14.array(ContractPortSchema).default([]), outputs: z14.array(ContractPortSchema).default([]) }).strict(),
11239
+ parameters: z14.object({ variables: z14.array(WorkflowParameterSchema).default([]), outputs: z14.array(WorkflowOutputBindingSchema).default([]) }).strict(),
11240
+ graph: z14.object({ nodes: z14.array(WorkflowNodeSchema), edges: z14.array(WorkflowEdgeSchema).default([]) }).strict(),
11241
+ execution: z14.object({
11242
+ timeoutMs: z14.number().int().positive().optional(),
11243
+ retries: z14.number().int().nonnegative().default(0),
11244
+ concurrencyLimit: z14.number().int().positive().optional(),
11245
+ idempotency: z14.enum(["required", "supported", "none"]),
11246
+ rateLimit: z14.object({ enabled: z14.boolean(), max: z14.number().int().nonnegative(), windowMs: z14.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
11017
11247
  if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
11018
11248
  }).optional(),
11019
- conductor: z13.object({
11020
- ownerApp: z13.string().optional(),
11021
- createTime: z13.number().int().nonnegative().optional(),
11022
- updateTime: z13.number().int().nonnegative().optional(),
11023
- createdBy: z13.string().optional(),
11024
- updatedBy: z13.string().optional(),
11249
+ conductor: z14.object({
11250
+ ownerApp: z14.string().optional(),
11251
+ createTime: z14.number().int().nonnegative().optional(),
11252
+ updateTime: z14.number().int().nonnegative().optional(),
11253
+ createdBy: z14.string().optional(),
11254
+ updatedBy: z14.string().optional(),
11025
11255
  failureWorkflow: ContractIdentifierSchema.optional(),
11026
- schemaVersion: z13.number().int().positive().optional(),
11027
- restartable: z13.boolean().optional(),
11028
- workflowStatusListenerEnabled: z13.boolean().optional(),
11029
- ownerEmail: z13.string().email().optional(),
11030
- timeoutPolicy: z13.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
11031
- variables: z13.record(z13.string(), JsonValueSchema).optional(),
11032
- inputTemplate: z13.record(z13.string(), JsonValueSchema).optional()
11256
+ schemaVersion: z14.number().int().positive().optional(),
11257
+ restartable: z14.boolean().optional(),
11258
+ workflowStatusListenerEnabled: z14.boolean().optional(),
11259
+ ownerEmail: z14.string().email().optional(),
11260
+ timeoutPolicy: z14.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
11261
+ variables: z14.record(z14.string(), JsonValueSchema).optional(),
11262
+ inputTemplate: z14.record(z14.string(), JsonValueSchema).optional()
11033
11263
  }).strict()
11034
11264
  }).strict(),
11035
- triggers: z13.array(WorkflowTriggerSchema).default([]),
11036
- views: z13.array(z13.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
11037
- dataContracts: z13.object({ reads: z13.array(ContractIdentifierSchema).default([]), writes: z13.array(ContractIdentifierSchema).default([]), emits: z13.array(ContractIdentifierSchema).default([]) }).strict(),
11038
- governance: z13.object({ activated: z13.boolean(), validated: z13.boolean(), validationIssues: z13.array(WorkflowValidationIssueSchema).default([]), hidden: z13.boolean().optional() }).strict(),
11039
- interfaces: z13.object({
11040
- openai: z13.object({ enabled: z13.boolean(), modelName: z13.string().trim().min(1).optional() }).strict(),
11265
+ triggers: z14.array(WorkflowTriggerSchema).default([]),
11266
+ views: z14.array(z14.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
11267
+ dataContracts: z14.object({ reads: z14.array(ContractIdentifierSchema).default([]), writes: z14.array(ContractIdentifierSchema).default([]), emits: z14.array(ContractIdentifierSchema).default([]) }).strict(),
11268
+ governance: z14.object({ activated: z14.boolean(), validated: z14.boolean(), validationIssues: z14.array(WorkflowValidationIssueSchema).default([]), hidden: z14.boolean().optional() }).strict(),
11269
+ interfaces: z14.object({
11270
+ openai: z14.object({ enabled: z14.boolean(), modelName: z14.string().trim().min(1).optional() }).strict(),
11041
11271
  shortcutRef: EntityRefSchema.optional(),
11042
11272
  preferredAppId: ContractIdentifierSchema.optional()
11043
11273
  }).strict().superRefine((interfaces, context) => {
@@ -11056,7 +11286,14 @@ var WorkflowDefinitionSchema = z13.object({
11056
11286
  });
11057
11287
  export {
11058
11288
  ActorRefSchema,
11289
+ AgentExecutionModeSchema,
11290
+ AgentModeSchema,
11059
11291
  AgentRuntimeEventSchema,
11292
+ AgentSessionCapabilitiesSchema,
11293
+ AgentSessionCapabilitySchema,
11294
+ AgentSessionEventSchema,
11295
+ AgentSessionSnapshotSchema,
11296
+ AgentSessionViewModelSchema,
11060
11297
  ApplicationHandoffEndpointSchema,
11061
11298
  ApplicationHandoffSchema,
11062
11299
  ApplicationRunSchema,
@@ -11181,6 +11418,8 @@ export {
11181
11418
  WorkflowParameterSchema,
11182
11419
  WorkflowParameterTypeSchema,
11183
11420
  WorkflowTriggerSchema,
11184
- WorkflowValidationIssueSchema
11421
+ WorkflowValidationIssueSchema,
11422
+ normalizeAgentExecutionMode,
11423
+ normalizeAgentMode
11185
11424
  };
11186
11425
  //# sourceMappingURL=index.mjs.map