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