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