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