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