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