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