@inf-monkeys-tech/monkeys 1.0.14 → 1.0.16
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 +115 -0
- package/lib/contracts/agent.d.ts.map +1 -1
- package/lib/contracts/agent.js +39 -1
- package/lib/contracts/agent.js.map +1 -1
- package/lib/esm/contracts/index.mjs +39 -0
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +134 -0
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +876 -430
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +23 -0
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/runtime/agent-session-projector.d.ts +17 -0
- package/lib/runtime/agent-session-projector.d.ts.map +1 -0
- package/lib/runtime/agent-session-projector.js +85 -0
- package/lib/runtime/agent-session-projector.js.map +1 -0
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/package.json +3 -1
- package/test/fixtures/agent-session-agent.json +134 -0
- package/test/fixtures/agent-session-chatbot.json +83 -0
- package/test/fixtures/agent-session-commands.json +72 -0
- package/test/fixtures/agent-session-kernel.json +131 -0
- package/test/fixtures/tenant-product-config.public.json +179 -0
|
@@ -7593,69 +7593,512 @@ var compileCapabilityRegistry = (sources) => {
|
|
|
7593
7593
|
});
|
|
7594
7594
|
};
|
|
7595
7595
|
|
|
7596
|
+
// src/contracts/agent.ts
|
|
7597
|
+
import { z as z5 } from "zod";
|
|
7598
|
+
var AgentModeSchema = z5.enum(["chatbot", "agent"]);
|
|
7599
|
+
var AgentConfigurationCapabilitySchema = z5.enum([
|
|
7600
|
+
"models",
|
|
7601
|
+
"skills",
|
|
7602
|
+
"tools",
|
|
7603
|
+
"mcp",
|
|
7604
|
+
"reasoning"
|
|
7605
|
+
]);
|
|
7606
|
+
var AgentModeCapabilitiesSchema = z5.object({
|
|
7607
|
+
models: z5.boolean(),
|
|
7608
|
+
skills: z5.boolean(),
|
|
7609
|
+
tools: z5.boolean(),
|
|
7610
|
+
mcp: z5.boolean(),
|
|
7611
|
+
reasoning: z5.boolean()
|
|
7612
|
+
}).strict();
|
|
7613
|
+
var AgentResourceModeSupportSchema = z5.object({
|
|
7614
|
+
modes: z5.array(AgentModeSchema).min(1)
|
|
7615
|
+
}).strict();
|
|
7616
|
+
var AGENT_MODE_CAPABILITIES = Object.freeze({
|
|
7617
|
+
chatbot: AgentModeCapabilitiesSchema.parse({
|
|
7618
|
+
models: true,
|
|
7619
|
+
skills: true,
|
|
7620
|
+
tools: true,
|
|
7621
|
+
mcp: true,
|
|
7622
|
+
reasoning: false
|
|
7623
|
+
}),
|
|
7624
|
+
agent: AgentModeCapabilitiesSchema.parse({
|
|
7625
|
+
models: true,
|
|
7626
|
+
skills: true,
|
|
7627
|
+
tools: true,
|
|
7628
|
+
mcp: true,
|
|
7629
|
+
reasoning: true
|
|
7630
|
+
})
|
|
7631
|
+
});
|
|
7632
|
+
var AgentSessionCapabilitySchema = z5.enum([
|
|
7633
|
+
"text",
|
|
7634
|
+
"reasoning",
|
|
7635
|
+
"plan",
|
|
7636
|
+
"tasks",
|
|
7637
|
+
"tools",
|
|
7638
|
+
"mcp",
|
|
7639
|
+
"shell",
|
|
7640
|
+
"fileChange",
|
|
7641
|
+
"skills",
|
|
7642
|
+
"approval",
|
|
7643
|
+
"artifacts",
|
|
7644
|
+
"usage",
|
|
7645
|
+
"resume",
|
|
7646
|
+
"diff",
|
|
7647
|
+
"workspaceFiles",
|
|
7648
|
+
"terminal",
|
|
7649
|
+
"testResults"
|
|
7650
|
+
]);
|
|
7651
|
+
var AgentSessionCapabilitiesSchema = z5.object({
|
|
7652
|
+
text: z5.boolean().default(true),
|
|
7653
|
+
reasoning: z5.boolean().default(false),
|
|
7654
|
+
plan: z5.boolean().default(false),
|
|
7655
|
+
tasks: z5.boolean().default(false),
|
|
7656
|
+
tools: z5.boolean().default(false),
|
|
7657
|
+
mcp: z5.boolean().default(false),
|
|
7658
|
+
shell: z5.boolean().default(false),
|
|
7659
|
+
fileChange: z5.boolean().default(false),
|
|
7660
|
+
skills: z5.boolean().default(false),
|
|
7661
|
+
approval: z5.boolean().default(false),
|
|
7662
|
+
artifacts: z5.boolean().default(false),
|
|
7663
|
+
usage: z5.boolean().default(false),
|
|
7664
|
+
resume: z5.boolean().default(false),
|
|
7665
|
+
diff: z5.boolean().default(false),
|
|
7666
|
+
workspaceFiles: z5.boolean().default(false),
|
|
7667
|
+
terminal: z5.boolean().default(false),
|
|
7668
|
+
testResults: z5.boolean().default(false)
|
|
7669
|
+
}).strict();
|
|
7670
|
+
var AGENT_SESSION_RUNTIME_CAPABILITIES = Object.freeze({
|
|
7671
|
+
chatbot: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, skills: true, approval: true, usage: true }),
|
|
7672
|
+
agent: AgentSessionCapabilitiesSchema.parse({ text: true, tools: true, mcp: true, shell: true, fileChange: true, skills: true, approval: true, artifacts: true, usage: true, resume: true })
|
|
7673
|
+
});
|
|
7674
|
+
var AGENT_SESSION_CAPABILITY_EVIDENCE = Object.freeze({
|
|
7675
|
+
text: { eventTypes: ["message"], commandTypes: [] },
|
|
7676
|
+
reasoning: { eventTypes: ["reasoning"], commandTypes: [] },
|
|
7677
|
+
plan: { eventTypes: ["plan"], commandTypes: [] },
|
|
7678
|
+
tasks: { eventTypes: ["task"], commandTypes: [] },
|
|
7679
|
+
tools: { eventTypes: ["tool"], commandTypes: [] },
|
|
7680
|
+
mcp: { eventTypes: ["tool"], commandTypes: [] },
|
|
7681
|
+
shell: { eventTypes: ["tool", "terminal"], commandTypes: [] },
|
|
7682
|
+
fileChange: { eventTypes: ["tool", "diff", "workspace-file"], commandTypes: [] },
|
|
7683
|
+
skills: { eventTypes: ["tool"], commandTypes: [] },
|
|
7684
|
+
approval: { eventTypes: ["approval"], commandTypes: ["approval"] },
|
|
7685
|
+
artifacts: { eventTypes: ["artifact"], commandTypes: [] },
|
|
7686
|
+
usage: { eventTypes: ["usage"], commandTypes: [] },
|
|
7687
|
+
resume: { eventTypes: ["resume"], commandTypes: ["resume"] },
|
|
7688
|
+
diff: { eventTypes: ["diff"], commandTypes: [] },
|
|
7689
|
+
workspaceFiles: { eventTypes: ["workspace-file"], commandTypes: [] },
|
|
7690
|
+
terminal: { eventTypes: ["terminal"], commandTypes: [] },
|
|
7691
|
+
testResults: { eventTypes: ["test-result"], commandTypes: [] }
|
|
7692
|
+
});
|
|
7693
|
+
var AgentSessionSnapshotSchema = z5.object({
|
|
7694
|
+
mode: AgentModeSchema,
|
|
7695
|
+
modelId: z5.string().trim().min(1),
|
|
7696
|
+
capabilities: AgentSessionCapabilitiesSchema
|
|
7697
|
+
}).strict();
|
|
7698
|
+
var AgentSessionStatusSchema = z5.enum([
|
|
7699
|
+
"queued",
|
|
7700
|
+
"running",
|
|
7701
|
+
"waiting_approval",
|
|
7702
|
+
"stopping",
|
|
7703
|
+
"stopped",
|
|
7704
|
+
"completed",
|
|
7705
|
+
"failed"
|
|
7706
|
+
]);
|
|
7707
|
+
var AgentSessionCommandTypeSchema = z5.enum(["stop", "resume", "retry", "approval"]);
|
|
7708
|
+
var AgentSessionCommandHeaderSchema = z5.object({
|
|
7709
|
+
contract: z5.literal("AgentSessionCommand"),
|
|
7710
|
+
commandId: ContractIdentifierSchema,
|
|
7711
|
+
sessionId: ContractIdentifierSchema,
|
|
7712
|
+
idempotencyKey: ContractIdentifierSchema,
|
|
7713
|
+
expectedSequence: z5.number().int().min(-1),
|
|
7714
|
+
issuedAt: IsoDateTimeSchema
|
|
7715
|
+
}).strict();
|
|
7716
|
+
var sessionCommand = (commandType, payload) => AgentSessionCommandHeaderSchema.extend({
|
|
7717
|
+
commandType: z5.literal(commandType),
|
|
7718
|
+
payload: z5.object(payload).strict()
|
|
7719
|
+
}).strict();
|
|
7720
|
+
var AgentSessionCommandSchema = z5.discriminatedUnion("commandType", [
|
|
7721
|
+
sessionCommand("stop", {
|
|
7722
|
+
reason: z5.string().trim().min(1).optional()
|
|
7723
|
+
}),
|
|
7724
|
+
sessionCommand("resume", {
|
|
7725
|
+
resumeEventId: ContractIdentifierSchema.optional()
|
|
7726
|
+
}),
|
|
7727
|
+
sessionCommand("retry", {
|
|
7728
|
+
sourceEventId: ContractIdentifierSchema
|
|
7729
|
+
}),
|
|
7730
|
+
sessionCommand("approval", {
|
|
7731
|
+
approvalId: ContractIdentifierSchema,
|
|
7732
|
+
decision: z5.enum(["approved", "rejected"]),
|
|
7733
|
+
reason: z5.string().trim().min(1).optional()
|
|
7734
|
+
})
|
|
7735
|
+
]);
|
|
7736
|
+
var AgentSessionCommandErrorCodeSchema = z5.enum([
|
|
7737
|
+
"SESSION_NOT_FOUND",
|
|
7738
|
+
"COMMAND_NOT_SUPPORTED",
|
|
7739
|
+
"CAPABILITY_UNAVAILABLE",
|
|
7740
|
+
"SEQUENCE_CONFLICT",
|
|
7741
|
+
"INVALID_SESSION_STATE",
|
|
7742
|
+
"TARGET_EVENT_NOT_FOUND",
|
|
7743
|
+
"TARGET_EVENT_NOT_RETRYABLE",
|
|
7744
|
+
"APPROVAL_NOT_FOUND",
|
|
7745
|
+
"APPROVAL_ALREADY_RESOLVED",
|
|
7746
|
+
"COMMAND_EXECUTION_FAILED"
|
|
7747
|
+
]);
|
|
7748
|
+
var AgentSessionCommandResultSchema = z5.object({
|
|
7749
|
+
contract: z5.literal("AgentSessionCommandResult"),
|
|
7750
|
+
commandId: ContractIdentifierSchema,
|
|
7751
|
+
sessionId: ContractIdentifierSchema,
|
|
7752
|
+
idempotencyKey: ContractIdentifierSchema,
|
|
7753
|
+
outcome: z5.enum(["accepted", "duplicate", "rejected", "failed"]),
|
|
7754
|
+
sessionStatus: AgentSessionStatusSchema,
|
|
7755
|
+
acceptedSequence: z5.number().int().nonnegative().optional(),
|
|
7756
|
+
resultEventIds: z5.array(ContractIdentifierSchema).default([]),
|
|
7757
|
+
error: z5.object({
|
|
7758
|
+
code: AgentSessionCommandErrorCodeSchema,
|
|
7759
|
+
message: z5.string(),
|
|
7760
|
+
retryable: z5.boolean()
|
|
7761
|
+
}).strict().optional(),
|
|
7762
|
+
occurredAt: IsoDateTimeSchema
|
|
7763
|
+
}).strict().superRefine((value, context) => {
|
|
7764
|
+
const requiresError = value.outcome === "rejected" || value.outcome === "failed";
|
|
7765
|
+
if (requiresError !== Boolean(value.error)) {
|
|
7766
|
+
context.addIssue({
|
|
7767
|
+
code: "custom",
|
|
7768
|
+
path: ["error"],
|
|
7769
|
+
message: requiresError ? "Rejected and failed command results require an error." : "Accepted and duplicate command results must not contain an error."
|
|
7770
|
+
});
|
|
7771
|
+
}
|
|
7772
|
+
});
|
|
7773
|
+
var AgentSessionEventHeaderSchema = z5.object({
|
|
7774
|
+
contract: z5.literal("AgentSessionEvent"),
|
|
7775
|
+
eventId: ContractIdentifierSchema,
|
|
7776
|
+
sessionId: ContractIdentifierSchema,
|
|
7777
|
+
sequence: z5.number().int().nonnegative(),
|
|
7778
|
+
idempotencyKey: ContractIdentifierSchema,
|
|
7779
|
+
occurredAt: IsoDateTimeSchema
|
|
7780
|
+
}).strict();
|
|
7781
|
+
var sessionEvent = (eventType, payload) => AgentSessionEventHeaderSchema.extend({
|
|
7782
|
+
eventType: z5.literal(eventType),
|
|
7783
|
+
payload: z5.object(payload).strict()
|
|
7784
|
+
}).strict();
|
|
7785
|
+
var AgentSessionEventSchema = z5.discriminatedUnion("eventType", [
|
|
7786
|
+
sessionEvent("message", {
|
|
7787
|
+
messageId: ContractIdentifierSchema,
|
|
7788
|
+
role: z5.enum(["user", "assistant", "system"]),
|
|
7789
|
+
operation: z5.enum(["append", "replace"]).default("append"),
|
|
7790
|
+
parts: z5.array(JsonValueSchema),
|
|
7791
|
+
status: z5.enum(["streaming", "completed", "failed"]).optional()
|
|
7792
|
+
}),
|
|
7793
|
+
sessionEvent("reasoning", {
|
|
7794
|
+
reasoningId: ContractIdentifierSchema,
|
|
7795
|
+
text: z5.string(),
|
|
7796
|
+
status: z5.enum(["streaming", "completed"])
|
|
7797
|
+
}),
|
|
7798
|
+
sessionEvent("plan", {
|
|
7799
|
+
planId: ContractIdentifierSchema,
|
|
7800
|
+
title: z5.string().optional(),
|
|
7801
|
+
status: z5.enum(["pending", "running", "completed", "failed"]),
|
|
7802
|
+
steps: z5.array(
|
|
7803
|
+
z5.object({
|
|
7804
|
+
id: ContractIdentifierSchema,
|
|
7805
|
+
title: z5.string(),
|
|
7806
|
+
status: z5.enum(["pending", "running", "completed", "failed", "skipped"])
|
|
7807
|
+
}).strict()
|
|
7808
|
+
)
|
|
7809
|
+
}),
|
|
7810
|
+
sessionEvent("task", {
|
|
7811
|
+
taskId: ContractIdentifierSchema,
|
|
7812
|
+
title: z5.string(),
|
|
7813
|
+
status: z5.enum(["pending", "running", "completed", "failed", "skipped"]),
|
|
7814
|
+
detail: z5.string().optional()
|
|
7815
|
+
}),
|
|
7816
|
+
sessionEvent("tool", {
|
|
7817
|
+
toolCallId: ContractIdentifierSchema,
|
|
7818
|
+
toolName: z5.string().trim().min(1),
|
|
7819
|
+
status: z5.enum(["pending", "running", "completed", "failed", "denied"]),
|
|
7820
|
+
input: JsonValueSchema.optional(),
|
|
7821
|
+
output: JsonValueSchema.optional(),
|
|
7822
|
+
error: z5.string().optional(),
|
|
7823
|
+
startedAt: IsoDateTimeSchema.optional(),
|
|
7824
|
+
completedAt: IsoDateTimeSchema.optional()
|
|
7825
|
+
}),
|
|
7826
|
+
sessionEvent("approval", {
|
|
7827
|
+
approvalId: ContractIdentifierSchema,
|
|
7828
|
+
toolCallId: ContractIdentifierSchema.optional(),
|
|
7829
|
+
status: z5.enum(["requested", "approved", "rejected", "expired"]),
|
|
7830
|
+
title: z5.string(),
|
|
7831
|
+
description: z5.string().optional(),
|
|
7832
|
+
requestedAction: JsonValueSchema.optional()
|
|
7833
|
+
}),
|
|
7834
|
+
sessionEvent("status", {
|
|
7835
|
+
status: AgentSessionStatusSchema,
|
|
7836
|
+
detail: z5.string().optional()
|
|
7837
|
+
}),
|
|
7838
|
+
sessionEvent("artifact", {
|
|
7839
|
+
artifactId: ContractIdentifierSchema,
|
|
7840
|
+
name: z5.string().trim().min(1),
|
|
7841
|
+
kind: z5.enum(["file", "image", "video", "audio", "web", "other"]),
|
|
7842
|
+
status: z5.enum(["pending", "ready", "failed"]),
|
|
7843
|
+
mimeType: z5.string().optional(),
|
|
7844
|
+
url: z5.string().url().optional(),
|
|
7845
|
+
size: z5.number().int().nonnegative().optional(),
|
|
7846
|
+
sourceEventId: ContractIdentifierSchema.optional()
|
|
7847
|
+
}),
|
|
7848
|
+
sessionEvent("usage", {
|
|
7849
|
+
inputTokens: z5.number().int().nonnegative().optional(),
|
|
7850
|
+
outputTokens: z5.number().int().nonnegative().optional(),
|
|
7851
|
+
totalTokens: z5.number().int().nonnegative().optional(),
|
|
7852
|
+
contextTokens: z5.number().int().nonnegative().optional(),
|
|
7853
|
+
contextWindow: z5.number().int().positive().optional()
|
|
7854
|
+
}),
|
|
7855
|
+
sessionEvent("resume", {
|
|
7856
|
+
resumable: z5.boolean(),
|
|
7857
|
+
state: JsonObjectSchema.optional(),
|
|
7858
|
+
reason: z5.string().optional()
|
|
7859
|
+
}),
|
|
7860
|
+
sessionEvent("error", {
|
|
7861
|
+
code: z5.string().trim().min(1),
|
|
7862
|
+
message: z5.string(),
|
|
7863
|
+
retryable: z5.boolean(),
|
|
7864
|
+
sourceEventId: ContractIdentifierSchema.optional(),
|
|
7865
|
+
details: JsonObjectSchema.optional()
|
|
7866
|
+
}),
|
|
7867
|
+
sessionEvent("diff", {
|
|
7868
|
+
path: z5.string().trim().min(1),
|
|
7869
|
+
status: z5.enum(["added", "modified", "deleted", "renamed"]),
|
|
7870
|
+
patch: z5.string().optional()
|
|
7871
|
+
}),
|
|
7872
|
+
sessionEvent("workspace-file", {
|
|
7873
|
+
path: z5.string().trim().min(1),
|
|
7874
|
+
operation: z5.enum(["upsert", "delete"]),
|
|
7875
|
+
mimeType: z5.string().optional(),
|
|
7876
|
+
size: z5.number().int().nonnegative().optional()
|
|
7877
|
+
}),
|
|
7878
|
+
sessionEvent("terminal", {
|
|
7879
|
+
terminalId: ContractIdentifierSchema,
|
|
7880
|
+
stream: z5.enum(["stdin", "stdout", "stderr", "status"]),
|
|
7881
|
+
chunk: z5.string(),
|
|
7882
|
+
exitCode: z5.number().int().optional()
|
|
7883
|
+
}),
|
|
7884
|
+
sessionEvent("test-result", {
|
|
7885
|
+
testId: ContractIdentifierSchema,
|
|
7886
|
+
name: z5.string(),
|
|
7887
|
+
status: z5.enum(["running", "passed", "failed", "skipped"]),
|
|
7888
|
+
durationMs: z5.number().nonnegative().optional(),
|
|
7889
|
+
output: z5.string().optional()
|
|
7890
|
+
})
|
|
7891
|
+
]);
|
|
7892
|
+
var AgentSessionViewModelSchema = z5.object({
|
|
7893
|
+
contract: z5.literal("AgentSessionViewModel"),
|
|
7894
|
+
sessionId: ContractIdentifierSchema,
|
|
7895
|
+
snapshot: AgentSessionSnapshotSchema,
|
|
7896
|
+
status: AgentSessionStatusSchema,
|
|
7897
|
+
events: z5.array(AgentSessionEventSchema),
|
|
7898
|
+
lastSequence: z5.number().int().min(-1),
|
|
7899
|
+
resumable: z5.boolean().default(false)
|
|
7900
|
+
}).strict().superRefine((value, context) => {
|
|
7901
|
+
const eventIds = /* @__PURE__ */ new Set();
|
|
7902
|
+
const idempotencyKeys = /* @__PURE__ */ new Set();
|
|
7903
|
+
let previousSequence = -1;
|
|
7904
|
+
value.events.forEach((event, index) => {
|
|
7905
|
+
if (event.sessionId !== value.sessionId) {
|
|
7906
|
+
context.addIssue({
|
|
7907
|
+
code: "custom",
|
|
7908
|
+
path: ["events", index, "sessionId"],
|
|
7909
|
+
message: "Event sessionId must match the view model sessionId."
|
|
7910
|
+
});
|
|
7911
|
+
}
|
|
7912
|
+
if (event.sequence <= previousSequence) {
|
|
7913
|
+
context.addIssue({
|
|
7914
|
+
code: "custom",
|
|
7915
|
+
path: ["events", index, "sequence"],
|
|
7916
|
+
message: "Events must be ordered by a strictly increasing sequence."
|
|
7917
|
+
});
|
|
7918
|
+
}
|
|
7919
|
+
if (eventIds.has(event.eventId)) {
|
|
7920
|
+
context.addIssue({
|
|
7921
|
+
code: "custom",
|
|
7922
|
+
path: ["events", index, "eventId"],
|
|
7923
|
+
message: "Event IDs must be unique within a session view model."
|
|
7924
|
+
});
|
|
7925
|
+
}
|
|
7926
|
+
if (idempotencyKeys.has(event.idempotencyKey)) {
|
|
7927
|
+
context.addIssue({
|
|
7928
|
+
code: "custom",
|
|
7929
|
+
path: ["events", index, "idempotencyKey"],
|
|
7930
|
+
message: "Idempotency keys must be unique within a session view model."
|
|
7931
|
+
});
|
|
7932
|
+
}
|
|
7933
|
+
previousSequence = event.sequence;
|
|
7934
|
+
eventIds.add(event.eventId);
|
|
7935
|
+
idempotencyKeys.add(event.idempotencyKey);
|
|
7936
|
+
});
|
|
7937
|
+
const expectedLastSequence = value.events.length > 0 ? value.events[value.events.length - 1].sequence : -1;
|
|
7938
|
+
if (value.lastSequence !== expectedLastSequence) {
|
|
7939
|
+
context.addIssue({
|
|
7940
|
+
code: "custom",
|
|
7941
|
+
path: ["lastSequence"],
|
|
7942
|
+
message: "lastSequence must match the final event sequence, or -1 when there are no events."
|
|
7943
|
+
});
|
|
7944
|
+
}
|
|
7945
|
+
});
|
|
7946
|
+
|
|
7947
|
+
// src/runtime/agent-session-projector.ts
|
|
7948
|
+
function createAgentSessionEventProjection(sessionId) {
|
|
7949
|
+
return {
|
|
7950
|
+
sessionId,
|
|
7951
|
+
events: [],
|
|
7952
|
+
lastSequence: -1,
|
|
7953
|
+
status: "queued",
|
|
7954
|
+
resumable: false
|
|
7955
|
+
};
|
|
7956
|
+
}
|
|
7957
|
+
function projectAgentSessionEvents(current, candidates) {
|
|
7958
|
+
const parsed = candidates.map(
|
|
7959
|
+
(candidate) => AgentSessionEventSchema.parse(candidate)
|
|
7960
|
+
);
|
|
7961
|
+
if (parsed.some((event) => event.sessionId !== current.sessionId)) {
|
|
7962
|
+
throw new TypeError(
|
|
7963
|
+
"Agent session event sessionId does not match the projection sessionId."
|
|
7964
|
+
);
|
|
7965
|
+
}
|
|
7966
|
+
const eventIds = new Set(current.events.map((event) => event.eventId));
|
|
7967
|
+
const idempotencyKeys = new Set(
|
|
7968
|
+
current.events.map((event) => event.idempotencyKey)
|
|
7969
|
+
);
|
|
7970
|
+
const eventsBySequence = new Map(
|
|
7971
|
+
current.events.map((event) => [event.sequence, event])
|
|
7972
|
+
);
|
|
7973
|
+
const acceptedCandidates = [];
|
|
7974
|
+
for (const event of parsed.sort(
|
|
7975
|
+
(left, right) => left.sequence - right.sequence
|
|
7976
|
+
)) {
|
|
7977
|
+
if (eventIds.has(event.eventId) || idempotencyKeys.has(event.idempotencyKey))
|
|
7978
|
+
continue;
|
|
7979
|
+
const existing = eventsBySequence.get(event.sequence);
|
|
7980
|
+
if (existing) {
|
|
7981
|
+
throw new TypeError(
|
|
7982
|
+
`Conflicting Agent session events share sequence ${event.sequence}.`
|
|
7983
|
+
);
|
|
7984
|
+
}
|
|
7985
|
+
eventsBySequence.set(event.sequence, event);
|
|
7986
|
+
eventIds.add(event.eventId);
|
|
7987
|
+
idempotencyKeys.add(event.idempotencyKey);
|
|
7988
|
+
acceptedCandidates.push(event);
|
|
7989
|
+
}
|
|
7990
|
+
for (const event of acceptedCandidates)
|
|
7991
|
+
eventsBySequence.delete(event.sequence);
|
|
7992
|
+
let expectedSequence = current.lastSequence + 1;
|
|
7993
|
+
let gap;
|
|
7994
|
+
for (const event of acceptedCandidates) {
|
|
7995
|
+
if (event.sequence < expectedSequence) {
|
|
7996
|
+
throw new TypeError(
|
|
7997
|
+
`Agent session event sequence ${event.sequence} is behind the recovery cursor.`
|
|
7998
|
+
);
|
|
7999
|
+
}
|
|
8000
|
+
if (event.sequence > expectedSequence) {
|
|
8001
|
+
gap = { expectedSequence, receivedSequence: event.sequence };
|
|
8002
|
+
break;
|
|
8003
|
+
}
|
|
8004
|
+
eventsBySequence.set(event.sequence, event);
|
|
8005
|
+
eventIds.add(event.eventId);
|
|
8006
|
+
idempotencyKeys.add(event.idempotencyKey);
|
|
8007
|
+
expectedSequence += 1;
|
|
8008
|
+
}
|
|
8009
|
+
const events = [...eventsBySequence.values()].sort(
|
|
8010
|
+
(left, right) => left.sequence - right.sequence
|
|
8011
|
+
);
|
|
8012
|
+
let status = "queued";
|
|
8013
|
+
let resumable = false;
|
|
8014
|
+
for (const event of events) {
|
|
8015
|
+
if (event.eventType === "status") status = event.payload.status;
|
|
8016
|
+
if (event.eventType === "resume") resumable = event.payload.resumable;
|
|
8017
|
+
}
|
|
8018
|
+
return {
|
|
8019
|
+
sessionId: current.sessionId,
|
|
8020
|
+
events,
|
|
8021
|
+
lastSequence: events.length > 0 ? events[events.length - 1].sequence : -1,
|
|
8022
|
+
status,
|
|
8023
|
+
resumable,
|
|
8024
|
+
...gap ? { gap } : {}
|
|
8025
|
+
};
|
|
8026
|
+
}
|
|
8027
|
+
function toAgentSessionViewModel(projection, snapshot) {
|
|
8028
|
+
return AgentSessionViewModelSchema.parse({
|
|
8029
|
+
contract: "AgentSessionViewModel",
|
|
8030
|
+
sessionId: projection.sessionId,
|
|
8031
|
+
snapshot,
|
|
8032
|
+
status: projection.status,
|
|
8033
|
+
events: projection.events,
|
|
8034
|
+
lastSequence: projection.lastSequence,
|
|
8035
|
+
resumable: projection.resumable
|
|
8036
|
+
});
|
|
8037
|
+
}
|
|
8038
|
+
|
|
7596
8039
|
// src/contracts/semantic.ts
|
|
7597
|
-
import { z as
|
|
8040
|
+
import { z as z8 } from "zod";
|
|
7598
8041
|
|
|
7599
8042
|
// src/contracts/data.ts
|
|
7600
|
-
import { z as
|
|
7601
|
-
var SourceRecordRefSchema =
|
|
8043
|
+
import { z as z6 } from "zod";
|
|
8044
|
+
var SourceRecordRefSchema = z6.object({
|
|
7602
8045
|
sourceId: ContractIdentifierSchema,
|
|
7603
8046
|
recordId: ContractIdentifierSchema,
|
|
7604
|
-
recordVersion:
|
|
8047
|
+
recordVersion: z6.union([z6.number().int().nonnegative(), ContractIdentifierSchema]),
|
|
7605
8048
|
hash: Sha256Schema
|
|
7606
8049
|
}).strict();
|
|
7607
|
-
var OntologyDefinitionSchema =
|
|
7608
|
-
contract:
|
|
8050
|
+
var OntologyDefinitionSchema = z6.object({
|
|
8051
|
+
contract: z6.literal("OntologyDefinition"),
|
|
7609
8052
|
ontologyId: ContractIdentifierSchema,
|
|
7610
8053
|
dataSpaceId: ContractIdentifierSchema,
|
|
7611
8054
|
ownerRepo: ContractIdentifierSchema,
|
|
7612
8055
|
bodySchemaRef: ContractIdentifierSchema,
|
|
7613
|
-
authority:
|
|
8056
|
+
authority: z6.object({
|
|
7614
8057
|
service: ContractIdentifierSchema,
|
|
7615
8058
|
storage: ContractIdentifierSchema,
|
|
7616
|
-
scope:
|
|
8059
|
+
scope: z6.enum(["tenant", "team", "user", "global"])
|
|
7617
8060
|
}).strict(),
|
|
7618
|
-
relationKinds:
|
|
7619
|
-
metricKinds:
|
|
8061
|
+
relationKinds: z6.array(ContractIdentifierSchema).default([]),
|
|
8062
|
+
metricKinds: z6.array(ContractIdentifierSchema).default([])
|
|
7620
8063
|
}).strict();
|
|
7621
|
-
var ProjectionSpecSchema =
|
|
7622
|
-
contract:
|
|
8064
|
+
var ProjectionSpecSchema = z6.object({
|
|
8065
|
+
contract: z6.literal("ProjectionSpec"),
|
|
7623
8066
|
projectionId: ContractIdentifierSchema,
|
|
7624
|
-
ontologyIds:
|
|
8067
|
+
ontologyIds: z6.array(ContractIdentifierSchema).min(1),
|
|
7625
8068
|
outputSchemaRef: ContractIdentifierSchema,
|
|
7626
|
-
operator:
|
|
7627
|
-
kind:
|
|
7628
|
-
configuration:
|
|
8069
|
+
operator: z6.object({
|
|
8070
|
+
kind: z6.enum(["query", "aggregate", "relationship", "search", "custom"]),
|
|
8071
|
+
configuration: z6.record(z6.string(), JsonValueSchema).default({})
|
|
7629
8072
|
}).strict(),
|
|
7630
|
-
materialization:
|
|
7631
|
-
invalidationEvents:
|
|
7632
|
-
rebuildable:
|
|
7633
|
-
lineagePolicy:
|
|
7634
|
-
sourceRecords:
|
|
7635
|
-
bodyVersions:
|
|
7636
|
-
runRefs:
|
|
7637
|
-
actorRefs:
|
|
8073
|
+
materialization: z6.enum(["on-demand", "event-driven", "scheduled"]),
|
|
8074
|
+
invalidationEvents: z6.array(ContractIdentifierSchema).default([]),
|
|
8075
|
+
rebuildable: z6.literal(true),
|
|
8076
|
+
lineagePolicy: z6.object({
|
|
8077
|
+
sourceRecords: z6.boolean(),
|
|
8078
|
+
bodyVersions: z6.boolean(),
|
|
8079
|
+
runRefs: z6.boolean(),
|
|
8080
|
+
actorRefs: z6.boolean()
|
|
7638
8081
|
}).strict()
|
|
7639
8082
|
}).strict();
|
|
7640
|
-
var LineageRecordSchema =
|
|
7641
|
-
contract:
|
|
8083
|
+
var LineageRecordSchema = z6.object({
|
|
8084
|
+
contract: z6.literal("LineageRecord"),
|
|
7642
8085
|
lineageId: ContractIdentifierSchema,
|
|
7643
8086
|
subjectRef: EntityRefSchema,
|
|
7644
|
-
sourceRecords:
|
|
7645
|
-
bodyRefs:
|
|
7646
|
-
runRefs:
|
|
7647
|
-
outputRefs:
|
|
7648
|
-
artifactRefs:
|
|
7649
|
-
actorRefs:
|
|
7650
|
-
evidenceRefs:
|
|
8087
|
+
sourceRecords: z6.array(SourceRecordRefSchema).default([]),
|
|
8088
|
+
bodyRefs: z6.array(EntityRefSchema).default([]),
|
|
8089
|
+
runRefs: z6.array(EntityRefSchema).default([]),
|
|
8090
|
+
outputRefs: z6.array(EntityRefSchema).default([]),
|
|
8091
|
+
artifactRefs: z6.array(EntityRefSchema).default([]),
|
|
8092
|
+
actorRefs: z6.array(EntityRefSchema).default([]),
|
|
8093
|
+
evidenceRefs: z6.array(EntityRefSchema).default([]),
|
|
7651
8094
|
recordedAt: IsoDateTimeSchema
|
|
7652
8095
|
}).strict();
|
|
7653
|
-
var DomainEventSchema =
|
|
7654
|
-
contract:
|
|
8096
|
+
var DomainEventSchema = z6.object({
|
|
8097
|
+
contract: z6.literal("DomainEvent"),
|
|
7655
8098
|
eventId: ContractIdentifierSchema,
|
|
7656
8099
|
eventType: ContractIdentifierSchema,
|
|
7657
8100
|
aggregateRef: EntityRefSchema,
|
|
7658
|
-
aggregateVersion:
|
|
8101
|
+
aggregateVersion: z6.number().int().nonnegative(),
|
|
7659
8102
|
requestId: ContractIdentifierSchema,
|
|
7660
8103
|
actorRef: EntityRefSchema,
|
|
7661
8104
|
payload: JsonValueSchema,
|
|
@@ -7663,8 +8106,8 @@ var DomainEventSchema = z5.object({
|
|
|
7663
8106
|
}).strict();
|
|
7664
8107
|
|
|
7665
8108
|
// src/contracts/page.ts
|
|
7666
|
-
import { z as
|
|
7667
|
-
var PageTypeSchema =
|
|
8109
|
+
import { z as z7 } from "zod";
|
|
8110
|
+
var PageTypeSchema = z7.enum([
|
|
7668
8111
|
"page",
|
|
7669
8112
|
"workspace",
|
|
7670
8113
|
"view",
|
|
@@ -7685,14 +8128,14 @@ var PageTypeSchema = z6.enum([
|
|
|
7685
8128
|
"global-design-board",
|
|
7686
8129
|
"iframe"
|
|
7687
8130
|
]);
|
|
7688
|
-
var PageVisibilitySchema =
|
|
7689
|
-
authenticated:
|
|
7690
|
-
permissionAllOf:
|
|
7691
|
-
permissionAnyOf:
|
|
7692
|
-
featureFlags:
|
|
7693
|
-
productContexts:
|
|
8131
|
+
var PageVisibilitySchema = z7.object({
|
|
8132
|
+
authenticated: z7.boolean().default(true),
|
|
8133
|
+
permissionAllOf: z7.array(ContractIdentifierSchema).default([]),
|
|
8134
|
+
permissionAnyOf: z7.array(ContractIdentifierSchema).default([]),
|
|
8135
|
+
featureFlags: z7.array(ContractIdentifierSchema).default([]),
|
|
8136
|
+
productContexts: z7.array(z7.enum(["studio", "kernel", "compute"])).min(1)
|
|
7694
8137
|
}).strict();
|
|
7695
|
-
var PageRoutePathSchema =
|
|
8138
|
+
var PageRoutePathSchema = z7.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
|
|
7696
8139
|
var requireCapabilityReference = (reference, path, context) => {
|
|
7697
8140
|
if (reference.kind !== "capability") {
|
|
7698
8141
|
context.addIssue({
|
|
@@ -7716,50 +8159,50 @@ var requireCapabilityReference = (reference, path, context) => {
|
|
|
7716
8159
|
});
|
|
7717
8160
|
}
|
|
7718
8161
|
};
|
|
7719
|
-
var PageDefinitionSchema =
|
|
7720
|
-
contract:
|
|
8162
|
+
var PageDefinitionSchema = z7.object({
|
|
8163
|
+
contract: z7.literal("PageDefinition"),
|
|
7721
8164
|
pageId: ContractIdentifierSchema,
|
|
7722
8165
|
ownerRepo: ContractIdentifierSchema,
|
|
7723
8166
|
title: LocalizedTextSchema,
|
|
7724
8167
|
pageType: PageTypeSchema,
|
|
7725
|
-
ownership:
|
|
8168
|
+
ownership: z7.object({
|
|
7726
8169
|
teamId: ContractIdentifierSchema.optional(),
|
|
7727
8170
|
creatorRef: EntityRefSchema.optional(),
|
|
7728
8171
|
studioId: ContractIdentifierSchema.optional(),
|
|
7729
|
-
builtIn:
|
|
8172
|
+
builtIn: z7.boolean()
|
|
7730
8173
|
}).strict(),
|
|
7731
|
-
record:
|
|
7732
|
-
createdTimestamp:
|
|
7733
|
-
updatedTimestamp:
|
|
7734
|
-
deleted:
|
|
8174
|
+
record: z7.object({
|
|
8175
|
+
createdTimestamp: z7.number().int().nonnegative().optional(),
|
|
8176
|
+
updatedTimestamp: z7.number().int().nonnegative().optional(),
|
|
8177
|
+
deleted: z7.boolean().default(false)
|
|
7735
8178
|
}).strict(),
|
|
7736
|
-
surface:
|
|
8179
|
+
surface: z7.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
|
|
7737
8180
|
routeId: ContractIdentifierSchema,
|
|
7738
8181
|
routePath: PageRoutePathSchema,
|
|
7739
8182
|
rendererKey: ContractIdentifierSchema,
|
|
7740
8183
|
capabilityRef: EntityRefSchema,
|
|
7741
|
-
capabilityRefs:
|
|
8184
|
+
capabilityRefs: z7.array(EntityRefSchema).default([]),
|
|
7742
8185
|
workflowRef: EntityRefSchema.optional(),
|
|
7743
|
-
binding:
|
|
8186
|
+
binding: z7.object({
|
|
7744
8187
|
sourceRef: ContractIdentifierSchema.optional(),
|
|
7745
8188
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
7746
8189
|
projectionRef: ContractIdentifierSchema.optional(),
|
|
7747
8190
|
stateRef: ContractIdentifierSchema.optional()
|
|
7748
8191
|
}).strict(),
|
|
7749
|
-
access:
|
|
7750
|
-
actions:
|
|
8192
|
+
access: z7.object({
|
|
8193
|
+
actions: z7.array(z7.enum(["read", "write", "execute", "manage-permissions"])).default([])
|
|
7751
8194
|
}).strict(),
|
|
7752
|
-
rendererConfig:
|
|
8195
|
+
rendererConfig: z7.object({
|
|
7753
8196
|
schemaRef: ContractIdentifierSchema,
|
|
7754
8197
|
value: JsonObjectSchema
|
|
7755
8198
|
}).strict(),
|
|
7756
|
-
navigation:
|
|
8199
|
+
navigation: z7.object({
|
|
7757
8200
|
label: LocalizedTextSchema,
|
|
7758
8201
|
iconRef: ContractIdentifierSchema.optional(),
|
|
7759
8202
|
parentPageId: ContractIdentifierSchema.optional(),
|
|
7760
|
-
order:
|
|
7761
|
-
hidden:
|
|
7762
|
-
pinned:
|
|
8203
|
+
order: z7.number().int().optional(),
|
|
8204
|
+
hidden: z7.boolean().default(false),
|
|
8205
|
+
pinned: z7.boolean().default(false)
|
|
7763
8206
|
}).strict(),
|
|
7764
8207
|
visibility: PageVisibilitySchema
|
|
7765
8208
|
}).strict().superRefine((page, context) => {
|
|
@@ -7780,8 +8223,8 @@ var PageDefinitionSchema = z6.object({
|
|
|
7780
8223
|
});
|
|
7781
8224
|
if (page.workflowRef && page.workflowRef.kind !== "workflow") context.addIssue({ code: "custom", path: ["workflowRef", "kind"], message: "workflowRef must reference a workflow." });
|
|
7782
8225
|
});
|
|
7783
|
-
var PageRuntimeDescriptorSchema =
|
|
7784
|
-
contract:
|
|
8226
|
+
var PageRuntimeDescriptorSchema = z7.object({
|
|
8227
|
+
contract: z7.literal("PageRuntimeDescriptor"),
|
|
7785
8228
|
page: PageDefinitionSchema,
|
|
7786
8229
|
nodeId: ContractIdentifierSchema,
|
|
7787
8230
|
parentNodeId: ContractIdentifierSchema.optional(),
|
|
@@ -7789,54 +8232,54 @@ var PageRuntimeDescriptorSchema = z6.object({
|
|
|
7789
8232
|
semanticRef: ContractIdentifierSchema.optional(),
|
|
7790
8233
|
dataContextRef: ContractIdentifierSchema.optional(),
|
|
7791
8234
|
providerRef: EntityRefSchema.optional(),
|
|
7792
|
-
surface:
|
|
8235
|
+
surface: z7.object({
|
|
7793
8236
|
frameOwner: ContractIdentifierSchema,
|
|
7794
8237
|
tone: ContractIdentifierSchema.optional(),
|
|
7795
|
-
density:
|
|
8238
|
+
density: z7.enum(["compact", "default", "comfortable"]).default("default")
|
|
7796
8239
|
}).strict(),
|
|
7797
|
-
scroll:
|
|
7798
|
-
owner:
|
|
7799
|
-
axis:
|
|
8240
|
+
scroll: z7.object({
|
|
8241
|
+
owner: z7.enum(["page", "surface", "provider"]),
|
|
8242
|
+
axis: z7.enum(["x", "y", "both", "none"]),
|
|
7800
8243
|
restoreKey: ContractIdentifierSchema.optional(),
|
|
7801
|
-
virtualized:
|
|
8244
|
+
virtualized: z7.boolean().default(false)
|
|
7802
8245
|
}).strict(),
|
|
7803
|
-
activation:
|
|
7804
|
-
lifecycle:
|
|
7805
|
-
mountPolicy:
|
|
7806
|
-
queryPolicy:
|
|
7807
|
-
deepLink:
|
|
7808
|
-
focusReturn:
|
|
8246
|
+
activation: z7.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
|
|
8247
|
+
lifecycle: z7.object({
|
|
8248
|
+
mountPolicy: z7.enum(["always", "when-visible", "when-active"]),
|
|
8249
|
+
queryPolicy: z7.enum(["always", "when-visible", "when-active", "manual"]),
|
|
8250
|
+
deepLink: z7.boolean(),
|
|
8251
|
+
focusReturn: z7.boolean()
|
|
7809
8252
|
}).strict()
|
|
7810
8253
|
}).strict();
|
|
7811
|
-
var PageRouteProjectionSchema =
|
|
8254
|
+
var PageRouteProjectionSchema = z7.object({
|
|
7812
8255
|
pageId: ContractIdentifierSchema,
|
|
7813
8256
|
routeId: ContractIdentifierSchema,
|
|
7814
8257
|
path: PageRoutePathSchema
|
|
7815
8258
|
}).strict();
|
|
7816
|
-
var PageNavigationProjectionSchema =
|
|
8259
|
+
var PageNavigationProjectionSchema = z7.object({
|
|
7817
8260
|
pageId: ContractIdentifierSchema,
|
|
7818
8261
|
routeId: ContractIdentifierSchema,
|
|
7819
8262
|
path: PageRoutePathSchema,
|
|
7820
8263
|
label: LocalizedTextSchema,
|
|
7821
8264
|
iconRef: ContractIdentifierSchema.optional(),
|
|
7822
8265
|
parentPageId: ContractIdentifierSchema.optional(),
|
|
7823
|
-
order:
|
|
7824
|
-
pinned:
|
|
8266
|
+
order: z7.number().int().optional(),
|
|
8267
|
+
pinned: z7.boolean()
|
|
7825
8268
|
}).strict();
|
|
7826
|
-
var PageGuardProjectionSchema =
|
|
8269
|
+
var PageGuardProjectionSchema = z7.object({
|
|
7827
8270
|
pageId: ContractIdentifierSchema,
|
|
7828
|
-
authenticated:
|
|
7829
|
-
permissionAllOf:
|
|
7830
|
-
permissionAnyOf:
|
|
7831
|
-
featureFlags:
|
|
7832
|
-
actions:
|
|
8271
|
+
authenticated: z7.boolean(),
|
|
8272
|
+
permissionAllOf: z7.array(ContractIdentifierSchema),
|
|
8273
|
+
permissionAnyOf: z7.array(ContractIdentifierSchema),
|
|
8274
|
+
featureFlags: z7.array(ContractIdentifierSchema),
|
|
8275
|
+
actions: z7.array(z7.enum(["read", "write", "execute", "manage-permissions"]))
|
|
7833
8276
|
}).strict();
|
|
7834
|
-
var PageRendererProjectionSchema =
|
|
8277
|
+
var PageRendererProjectionSchema = z7.object({
|
|
7835
8278
|
pageId: ContractIdentifierSchema,
|
|
7836
|
-
surface:
|
|
8279
|
+
surface: z7.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
|
|
7837
8280
|
rendererKey: ContractIdentifierSchema,
|
|
7838
8281
|
capabilityRef: EntityRefSchema,
|
|
7839
|
-
capabilityRefs:
|
|
8282
|
+
capabilityRefs: z7.array(EntityRefSchema),
|
|
7840
8283
|
providerRef: EntityRefSchema,
|
|
7841
8284
|
binding: PageDefinitionSchema.shape.binding,
|
|
7842
8285
|
rendererConfig: PageDefinitionSchema.shape.rendererConfig,
|
|
@@ -7877,13 +8320,13 @@ var duplicateProjectionIdentity = (values, identity) => {
|
|
|
7877
8320
|
}
|
|
7878
8321
|
return void 0;
|
|
7879
8322
|
};
|
|
7880
|
-
var PageRuntimeProjectionSchema =
|
|
7881
|
-
contract:
|
|
7882
|
-
product:
|
|
7883
|
-
routes:
|
|
7884
|
-
navigation:
|
|
7885
|
-
guards:
|
|
7886
|
-
renderers:
|
|
8323
|
+
var PageRuntimeProjectionSchema = z7.object({
|
|
8324
|
+
contract: z7.literal("PageRuntimeProjection"),
|
|
8325
|
+
product: z7.enum(["studio", "kernel", "compute"]),
|
|
8326
|
+
routes: z7.array(PageRouteProjectionSchema),
|
|
8327
|
+
navigation: z7.array(PageNavigationProjectionSchema),
|
|
8328
|
+
guards: z7.array(PageGuardProjectionSchema),
|
|
8329
|
+
renderers: z7.array(PageRendererProjectionSchema)
|
|
7887
8330
|
}).strict().superRefine((projection, context) => {
|
|
7888
8331
|
const tables = [
|
|
7889
8332
|
["routes", projection.routes.map((value) => value.pageId)],
|
|
@@ -7939,38 +8382,38 @@ var PageRuntimeProjectionSchema = z6.object({
|
|
|
7939
8382
|
});
|
|
7940
8383
|
|
|
7941
8384
|
// src/contracts/semantic.ts
|
|
7942
|
-
var ConceptRelationshipSchema =
|
|
8385
|
+
var ConceptRelationshipSchema = z8.object({
|
|
7943
8386
|
kind: ContractIdentifierSchema,
|
|
7944
8387
|
targetConceptId: ContractIdentifierSchema,
|
|
7945
|
-
cardinality:
|
|
8388
|
+
cardinality: z8.enum(["one", "optional", "many"])
|
|
7946
8389
|
}).strict();
|
|
7947
|
-
var ConceptDefinitionSchema =
|
|
7948
|
-
contract:
|
|
8390
|
+
var ConceptDefinitionSchema = z8.object({
|
|
8391
|
+
contract: z8.literal("ConceptDefinition"),
|
|
7949
8392
|
conceptId: ContractIdentifierSchema,
|
|
7950
8393
|
ownerRepo: ContractIdentifierSchema,
|
|
7951
|
-
displayName:
|
|
7952
|
-
description:
|
|
8394
|
+
displayName: z8.string().trim().min(1),
|
|
8395
|
+
description: z8.string().optional(),
|
|
7953
8396
|
schemaRef: ContractIdentifierSchema,
|
|
7954
8397
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
7955
|
-
capabilityIds:
|
|
7956
|
-
commandNames:
|
|
7957
|
-
relationships:
|
|
8398
|
+
capabilityIds: z8.array(ContractIdentifierSchema).default([]),
|
|
8399
|
+
commandNames: z8.array(ContractIdentifierSchema).default([]),
|
|
8400
|
+
relationships: z8.array(ConceptRelationshipSchema).default([])
|
|
7958
8401
|
}).strict();
|
|
7959
|
-
var DomainCommandDefinitionSchema =
|
|
7960
|
-
contract:
|
|
8402
|
+
var DomainCommandDefinitionSchema = z8.object({
|
|
8403
|
+
contract: z8.literal("DomainCommandDefinition"),
|
|
7961
8404
|
commandName: ContractIdentifierSchema,
|
|
7962
8405
|
ownerRepo: ContractIdentifierSchema,
|
|
7963
|
-
displayName:
|
|
7964
|
-
description:
|
|
7965
|
-
targetKinds:
|
|
8406
|
+
displayName: z8.string().trim().min(1),
|
|
8407
|
+
description: z8.string().optional(),
|
|
8408
|
+
targetKinds: z8.array(ContractIdentifierSchema).min(1),
|
|
7966
8409
|
inputSchemaRef: ContractIdentifierSchema,
|
|
7967
8410
|
outputSchemaRef: ContractIdentifierSchema.optional(),
|
|
7968
|
-
requiredPermissionCodes:
|
|
8411
|
+
requiredPermissionCodes: z8.array(ContractIdentifierSchema).default([]),
|
|
7969
8412
|
handlerRef: EntityRefSchema,
|
|
7970
|
-
sideEffects:
|
|
8413
|
+
sideEffects: z8.array(z8.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
|
|
7971
8414
|
}).strict();
|
|
7972
|
-
var DomainCommandSchema =
|
|
7973
|
-
contract:
|
|
8415
|
+
var DomainCommandSchema = z8.object({
|
|
8416
|
+
contract: z8.literal("DomainCommand"),
|
|
7974
8417
|
commandId: ContractIdentifierSchema,
|
|
7975
8418
|
commandName: ContractIdentifierSchema,
|
|
7976
8419
|
requestId: ContractIdentifierSchema,
|
|
@@ -7978,29 +8421,29 @@ var DomainCommandSchema = z7.object({
|
|
|
7978
8421
|
idempotencyKey: ContractIdentifierSchema,
|
|
7979
8422
|
targetRef: EntityRefSchema,
|
|
7980
8423
|
actorRef: EntityRefSchema,
|
|
7981
|
-
source:
|
|
7982
|
-
product:
|
|
8424
|
+
source: z8.object({
|
|
8425
|
+
product: z8.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
|
|
7983
8426
|
pageId: ContractIdentifierSchema.optional(),
|
|
7984
8427
|
capabilityId: ContractIdentifierSchema.optional()
|
|
7985
8428
|
}).strict(),
|
|
7986
8429
|
payload: JsonObjectSchema,
|
|
7987
8430
|
issuedAt: IsoDateTimeSchema
|
|
7988
8431
|
}).strict();
|
|
7989
|
-
var ProductDeclarationSchema =
|
|
7990
|
-
contract:
|
|
8432
|
+
var ProductDeclarationSchema = z8.object({
|
|
8433
|
+
contract: z8.literal("ProductDeclaration"),
|
|
7991
8434
|
declarationId: ContractIdentifierSchema,
|
|
7992
8435
|
ownerRepo: ContractIdentifierSchema,
|
|
7993
|
-
concepts:
|
|
7994
|
-
ontologies:
|
|
7995
|
-
projections:
|
|
7996
|
-
commands:
|
|
7997
|
-
capabilities:
|
|
7998
|
-
pages:
|
|
8436
|
+
concepts: z8.array(ConceptDefinitionSchema).default([]),
|
|
8437
|
+
ontologies: z8.array(OntologyDefinitionSchema).default([]),
|
|
8438
|
+
projections: z8.array(ProjectionSpecSchema).default([]),
|
|
8439
|
+
commands: z8.array(DomainCommandDefinitionSchema).default([]),
|
|
8440
|
+
capabilities: z8.array(CapabilityManifestSchema).default([]),
|
|
8441
|
+
pages: z8.array(PageDefinitionSchema).default([])
|
|
7999
8442
|
}).strict();
|
|
8000
|
-
var DeclarationGraphEdgeSchema =
|
|
8443
|
+
var DeclarationGraphEdgeSchema = z8.object({
|
|
8001
8444
|
from: EntityRefSchema,
|
|
8002
8445
|
to: EntityRefSchema,
|
|
8003
|
-
relation:
|
|
8446
|
+
relation: z8.enum([
|
|
8004
8447
|
"uses-ontology",
|
|
8005
8448
|
"uses-projection",
|
|
8006
8449
|
"uses-capability",
|
|
@@ -8008,17 +8451,17 @@ var DeclarationGraphEdgeSchema = z7.object({
|
|
|
8008
8451
|
"relates-to-concept"
|
|
8009
8452
|
])
|
|
8010
8453
|
}).strict();
|
|
8011
|
-
var ChangeImpactSchema =
|
|
8454
|
+
var ChangeImpactSchema = z8.object({
|
|
8012
8455
|
changedRef: EntityRefSchema,
|
|
8013
|
-
affectedRefs:
|
|
8014
|
-
reasons:
|
|
8456
|
+
affectedRefs: z8.array(EntityRefSchema),
|
|
8457
|
+
reasons: z8.array(ContractIdentifierSchema).min(1)
|
|
8015
8458
|
}).strict();
|
|
8016
|
-
var ChangeImpactGraphSchema =
|
|
8017
|
-
contract:
|
|
8459
|
+
var ChangeImpactGraphSchema = z8.object({
|
|
8460
|
+
contract: z8.literal("ChangeImpactGraph"),
|
|
8018
8461
|
declarationId: ContractIdentifierSchema,
|
|
8019
|
-
nodes:
|
|
8020
|
-
edges:
|
|
8021
|
-
impacts:
|
|
8462
|
+
nodes: z8.array(EntityRefSchema),
|
|
8463
|
+
edges: z8.array(DeclarationGraphEdgeSchema),
|
|
8464
|
+
impacts: z8.array(ChangeImpactSchema),
|
|
8022
8465
|
generatedAt: IsoDateTimeSchema
|
|
8023
8466
|
}).strict();
|
|
8024
8467
|
|
|
@@ -8762,10 +9205,10 @@ var compileRenderTree = (input) => {
|
|
|
8762
9205
|
};
|
|
8763
9206
|
|
|
8764
9207
|
// src/contracts/tenant.ts
|
|
8765
|
-
import { z as
|
|
9208
|
+
import { z as z10 } from "zod";
|
|
8766
9209
|
|
|
8767
9210
|
// src/contracts/theme.ts
|
|
8768
|
-
import { z as
|
|
9211
|
+
import { z as z9 } from "zod";
|
|
8769
9212
|
|
|
8770
9213
|
// src/theme-tokens/core.ts
|
|
8771
9214
|
var import_ajv = __toESM(require_ajv());
|
|
@@ -10992,20 +11435,20 @@ function assertMonkeysThemeTokensComplete(input) {
|
|
|
10992
11435
|
}
|
|
10993
11436
|
|
|
10994
11437
|
// src/contracts/theme.ts
|
|
10995
|
-
var ThemeTokenTypeSchema =
|
|
10996
|
-
var ThemeTokenSchema =
|
|
11438
|
+
var ThemeTokenTypeSchema = z9.enum(THEME_TOKEN_TYPES);
|
|
11439
|
+
var ThemeTokenSchema = z9.record(z9.string(), z9.unknown()).superRefine((input, context) => {
|
|
10997
11440
|
const issues = validateThemeTokensDocumentStructure({ token: input });
|
|
10998
11441
|
for (const issue of issues) {
|
|
10999
11442
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
11000
11443
|
}
|
|
11001
11444
|
});
|
|
11002
|
-
var ThemeTokenGroupSchema =
|
|
11445
|
+
var ThemeTokenGroupSchema = z9.record(z9.string(), z9.unknown()).superRefine((input, context) => {
|
|
11003
11446
|
const issues = validateThemeTokensDocumentStructure(input);
|
|
11004
11447
|
for (const issue of issues) {
|
|
11005
11448
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
11006
11449
|
}
|
|
11007
11450
|
});
|
|
11008
|
-
var ThemeTokensSchema =
|
|
11451
|
+
var ThemeTokensSchema = z9.record(z9.string(), z9.unknown()).superRefine((input, context) => {
|
|
11009
11452
|
const issues = validateThemeTokensDocument(input);
|
|
11010
11453
|
for (const issue of issues) {
|
|
11011
11454
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
@@ -11032,9 +11475,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
|
|
|
11032
11475
|
});
|
|
11033
11476
|
|
|
11034
11477
|
// src/contracts/tenant.ts
|
|
11035
|
-
var DesignTokenFileSourceSchema =
|
|
11036
|
-
type:
|
|
11037
|
-
path:
|
|
11478
|
+
var DesignTokenFileSourceSchema = z10.object({
|
|
11479
|
+
type: z10.literal("file"),
|
|
11480
|
+
path: z10.string().trim().min(1).superRefine((source, context) => {
|
|
11038
11481
|
if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
|
|
11039
11482
|
context.addIssue({
|
|
11040
11483
|
code: "custom",
|
|
@@ -11043,9 +11486,9 @@ var DesignTokenFileSourceSchema = z9.object({
|
|
|
11043
11486
|
}
|
|
11044
11487
|
})
|
|
11045
11488
|
}).strict();
|
|
11046
|
-
var DesignTokenUrlSourceSchema =
|
|
11047
|
-
type:
|
|
11048
|
-
url:
|
|
11489
|
+
var DesignTokenUrlSourceSchema = z10.object({
|
|
11490
|
+
type: z10.literal("url"),
|
|
11491
|
+
url: z10.string().trim().min(1).superRefine((source, context) => {
|
|
11049
11492
|
if (!/^https?:\/\//i.test(source)) {
|
|
11050
11493
|
context.addIssue({
|
|
11051
11494
|
code: "custom",
|
|
@@ -11054,109 +11497,109 @@ var DesignTokenUrlSourceSchema = z9.object({
|
|
|
11054
11497
|
}
|
|
11055
11498
|
})
|
|
11056
11499
|
}).strict();
|
|
11057
|
-
var DesignTokenInlineSourceSchema =
|
|
11058
|
-
type:
|
|
11500
|
+
var DesignTokenInlineSourceSchema = z10.object({
|
|
11501
|
+
type: z10.literal("inline"),
|
|
11059
11502
|
document: ThemeTokensSchema
|
|
11060
11503
|
}).strict();
|
|
11061
|
-
var DesignTokenSourceSchema =
|
|
11504
|
+
var DesignTokenSourceSchema = z10.discriminatedUnion("type", [
|
|
11062
11505
|
DesignTokenFileSourceSchema,
|
|
11063
11506
|
DesignTokenUrlSourceSchema,
|
|
11064
11507
|
DesignTokenInlineSourceSchema
|
|
11065
11508
|
]);
|
|
11066
|
-
var TenantDesignTokensConfigSchema =
|
|
11509
|
+
var TenantDesignTokensConfigSchema = z10.object({
|
|
11067
11510
|
/** Ordered tenant overrides. The backend always applies the product default first. */
|
|
11068
|
-
tokenSources:
|
|
11511
|
+
tokenSources: z10.array(DesignTokenSourceSchema)
|
|
11069
11512
|
}).strict();
|
|
11070
|
-
var TenantAuthBindingSchema =
|
|
11071
|
-
kind:
|
|
11513
|
+
var TenantAuthBindingSchema = z10.object({
|
|
11514
|
+
kind: z10.literal("auth-provider"),
|
|
11072
11515
|
providerId: ContractIdentifierSchema,
|
|
11073
11516
|
policyRef: ContractIdentifierSchema.optional()
|
|
11074
11517
|
}).strict();
|
|
11075
|
-
var TenantDataBindingSchema =
|
|
11076
|
-
|
|
11077
|
-
kind:
|
|
11518
|
+
var TenantDataBindingSchema = z10.discriminatedUnion("kind", [
|
|
11519
|
+
z10.object({
|
|
11520
|
+
kind: z10.literal("data-provider"),
|
|
11078
11521
|
providerId: ContractIdentifierSchema,
|
|
11079
11522
|
domainRef: ContractIdentifierSchema.optional()
|
|
11080
11523
|
}).strict(),
|
|
11081
|
-
|
|
11082
|
-
kind:
|
|
11524
|
+
z10.object({
|
|
11525
|
+
kind: z10.literal("projection"),
|
|
11083
11526
|
projectionRef: ContractIdentifierSchema,
|
|
11084
11527
|
domainRef: ContractIdentifierSchema.optional()
|
|
11085
11528
|
}).strict()
|
|
11086
11529
|
]);
|
|
11087
|
-
var TenantAuthBindingsSchema =
|
|
11530
|
+
var TenantAuthBindingsSchema = z10.record(
|
|
11088
11531
|
ContractIdentifierSchema,
|
|
11089
11532
|
TenantAuthBindingSchema
|
|
11090
11533
|
);
|
|
11091
|
-
var TenantDataBindingsSchema =
|
|
11534
|
+
var TenantDataBindingsSchema = z10.record(
|
|
11092
11535
|
ContractIdentifierSchema,
|
|
11093
11536
|
TenantDataBindingSchema
|
|
11094
11537
|
);
|
|
11095
|
-
var AssetVariantsSchema =
|
|
11096
|
-
light:
|
|
11097
|
-
dark:
|
|
11538
|
+
var AssetVariantsSchema = z10.object({
|
|
11539
|
+
light: z10.string().optional(),
|
|
11540
|
+
dark: z10.string().optional()
|
|
11098
11541
|
}).strict();
|
|
11099
|
-
var ThemeHeadbarSchema =
|
|
11100
|
-
theme:
|
|
11101
|
-
navPosition:
|
|
11102
|
-
actions:
|
|
11103
|
-
profile:
|
|
11104
|
-
showTeamQuota:
|
|
11542
|
+
var ThemeHeadbarSchema = z10.object({
|
|
11543
|
+
theme: z10.enum(["card", "glassy", "ghost"]).optional(),
|
|
11544
|
+
navPosition: z10.enum(["left", "center", "right"]).optional(),
|
|
11545
|
+
actions: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]).optional(),
|
|
11546
|
+
profile: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]).optional(),
|
|
11547
|
+
showTeamQuota: z10.boolean().optional()
|
|
11105
11548
|
}).strict();
|
|
11106
|
-
var TenantHeadbarModuleLeafSchema =
|
|
11549
|
+
var TenantHeadbarModuleLeafSchema = z10.object({
|
|
11107
11550
|
id: ContractIdentifierSchema,
|
|
11108
|
-
extraInfo:
|
|
11109
|
-
displayName:
|
|
11110
|
-
visible:
|
|
11111
|
-
disabled:
|
|
11112
|
-
icon:
|
|
11113
|
-
showQuickSwitcher:
|
|
11114
|
-
showSidebar:
|
|
11551
|
+
extraInfo: z10.boolean().optional(),
|
|
11552
|
+
displayName: z10.union([z10.string(), z10.record(LocaleIdentifierSchema, z10.string())]).optional(),
|
|
11553
|
+
visible: z10.boolean().optional(),
|
|
11554
|
+
disabled: z10.boolean().optional(),
|
|
11555
|
+
icon: z10.string().optional(),
|
|
11556
|
+
showQuickSwitcher: z10.boolean().optional(),
|
|
11557
|
+
showSidebar: z10.boolean().optional()
|
|
11115
11558
|
}).strict();
|
|
11116
11559
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
11117
|
-
children:
|
|
11560
|
+
children: z10.array(TenantHeadbarModuleLeafSchema).optional()
|
|
11118
11561
|
}).strict();
|
|
11119
|
-
var KernelHeadbarSchema =
|
|
11120
|
-
theme:
|
|
11121
|
-
layoutMode:
|
|
11122
|
-
heightPx:
|
|
11123
|
-
navPosition:
|
|
11124
|
-
brandTitle:
|
|
11125
|
-
menuRadius:
|
|
11562
|
+
var KernelHeadbarSchema = z10.object({
|
|
11563
|
+
theme: z10.literal("card").optional(),
|
|
11564
|
+
layoutMode: z10.enum(["boxed", "full-bleed"]).optional(),
|
|
11565
|
+
heightPx: z10.number().positive().optional(),
|
|
11566
|
+
navPosition: z10.enum(["left", "center", "right"]).optional(),
|
|
11567
|
+
brandTitle: z10.string().optional(),
|
|
11568
|
+
menuRadius: z10.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
|
|
11126
11569
|
}).strict();
|
|
11127
|
-
var CustomIconSchema =
|
|
11128
|
-
color:
|
|
11129
|
-
url:
|
|
11130
|
-
type:
|
|
11131
|
-
hintTextColor:
|
|
11570
|
+
var CustomIconSchema = z10.object({
|
|
11571
|
+
color: z10.string().optional(),
|
|
11572
|
+
url: z10.string().optional(),
|
|
11573
|
+
type: z10.enum(["svg", "image"]).optional(),
|
|
11574
|
+
hintTextColor: z10.string().optional()
|
|
11132
11575
|
}).strict();
|
|
11133
|
-
var WorkbenchCustomerToolSchema =
|
|
11576
|
+
var WorkbenchCustomerToolSchema = z10.object({
|
|
11134
11577
|
id: ContractIdentifierSchema,
|
|
11135
|
-
label:
|
|
11136
|
-
fixed:
|
|
11578
|
+
label: z10.union([z10.string(), z10.record(LocaleIdentifierSchema, z10.string())]).optional(),
|
|
11579
|
+
fixed: z10.boolean().optional()
|
|
11137
11580
|
}).strict();
|
|
11138
|
-
var WorkbenchStudioOverrideSchema =
|
|
11139
|
-
studioName:
|
|
11140
|
-
dropdownToolsDefault:
|
|
11141
|
-
existingToolsDefault:
|
|
11142
|
-
historyColumnsDefault:
|
|
11581
|
+
var WorkbenchStudioOverrideSchema = z10.object({
|
|
11582
|
+
studioName: z10.string().trim().min(1),
|
|
11583
|
+
dropdownToolsDefault: z10.array(ContractIdentifierSchema).optional(),
|
|
11584
|
+
existingToolsDefault: z10.array(ContractIdentifierSchema).optional(),
|
|
11585
|
+
historyColumnsDefault: z10.number().int().min(1).max(6).optional()
|
|
11143
11586
|
}).strict();
|
|
11144
|
-
var TenantWorkbenchPageContextSchema =
|
|
11587
|
+
var TenantWorkbenchPageContextSchema = z10.object({
|
|
11145
11588
|
workflow: JsonObjectSchema.optional(),
|
|
11146
11589
|
agent: JsonObjectSchema.optional(),
|
|
11147
11590
|
agentId: ContractIdentifierSchema.optional(),
|
|
11148
11591
|
designProject: JsonObjectSchema.optional(),
|
|
11149
11592
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
11150
|
-
iframeUrl:
|
|
11151
|
-
info:
|
|
11593
|
+
iframeUrl: z10.string().trim().min(1).optional(),
|
|
11594
|
+
info: z10.object({
|
|
11152
11595
|
displayName: LocalizedTextSchema.optional(),
|
|
11153
11596
|
description: LocalizedTextSchema.optional(),
|
|
11154
|
-
iconUrl:
|
|
11597
|
+
iconUrl: z10.string().trim().min(1).optional()
|
|
11155
11598
|
}).strict().optional(),
|
|
11156
|
-
isBuiltinPinned:
|
|
11157
|
-
isBuiltinReadonly:
|
|
11599
|
+
isBuiltinPinned: z10.boolean().optional(),
|
|
11600
|
+
isBuiltinReadonly: z10.boolean().optional()
|
|
11158
11601
|
}).strict();
|
|
11159
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
11602
|
+
var TenantWorkbenchPageEnvelopeSchema = z10.object({
|
|
11160
11603
|
definition: PageDefinitionSchema,
|
|
11161
11604
|
context: TenantWorkbenchPageContextSchema
|
|
11162
11605
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -11189,56 +11632,56 @@ var TenantWorkbenchPageEnvelopeSchema = z9.object({
|
|
|
11189
11632
|
});
|
|
11190
11633
|
}
|
|
11191
11634
|
});
|
|
11192
|
-
var TenantWorkbenchPageGroupSchema =
|
|
11635
|
+
var TenantWorkbenchPageGroupSchema = z10.object({
|
|
11193
11636
|
id: ContractIdentifierSchema,
|
|
11194
|
-
pageIds:
|
|
11637
|
+
pageIds: z10.array(ContractIdentifierSchema),
|
|
11195
11638
|
displayName: LocalizedTextSchema,
|
|
11196
|
-
isBuiltIn:
|
|
11197
|
-
iconUrl:
|
|
11198
|
-
sortIndex:
|
|
11639
|
+
isBuiltIn: z10.boolean(),
|
|
11640
|
+
iconUrl: z10.string().optional(),
|
|
11641
|
+
sortIndex: z10.number().int().nullable().optional(),
|
|
11199
11642
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
11200
11643
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
11201
11644
|
studioId: ContractIdentifierSchema.optional()
|
|
11202
11645
|
}).strict();
|
|
11203
|
-
var TenantWorkbenchConfigSchema =
|
|
11204
|
-
pages:
|
|
11205
|
-
pageGroups:
|
|
11206
|
-
catalog:
|
|
11207
|
-
quickSwitcherMaxItems:
|
|
11208
|
-
defaultOrder:
|
|
11209
|
-
groups:
|
|
11210
|
-
pages:
|
|
11646
|
+
var TenantWorkbenchConfigSchema = z10.object({
|
|
11647
|
+
pages: z10.array(TenantWorkbenchPageEnvelopeSchema),
|
|
11648
|
+
pageGroups: z10.array(TenantWorkbenchPageGroupSchema),
|
|
11649
|
+
catalog: z10.object({ enabled: z10.boolean().optional(), defaultEntry: z10.boolean().optional() }).strict().optional(),
|
|
11650
|
+
quickSwitcherMaxItems: z10.number().int().nonnegative().optional(),
|
|
11651
|
+
defaultOrder: z10.object({
|
|
11652
|
+
groups: z10.array(ContractIdentifierSchema),
|
|
11653
|
+
pages: z10.record(ContractIdentifierSchema, z10.array(ContractIdentifierSchema))
|
|
11211
11654
|
}).strict().optional(),
|
|
11212
|
-
customers:
|
|
11213
|
-
dropdownToolsDefault:
|
|
11214
|
-
layoutManagerTools:
|
|
11215
|
-
studioTabsMode:
|
|
11216
|
-
historyWatermark:
|
|
11217
|
-
svgUrl:
|
|
11218
|
-
coverage:
|
|
11219
|
-
maxLongEdgeRatio:
|
|
11220
|
-
sizing:
|
|
11655
|
+
customers: z10.object({
|
|
11656
|
+
dropdownToolsDefault: z10.array(ContractIdentifierSchema).optional(),
|
|
11657
|
+
layoutManagerTools: z10.array(WorkbenchCustomerToolSchema).optional(),
|
|
11658
|
+
studioTabsMode: z10.enum(["dropdown", "tabs"]).optional(),
|
|
11659
|
+
historyWatermark: z10.object({
|
|
11660
|
+
svgUrl: z10.string().optional(),
|
|
11661
|
+
coverage: z10.array(z10.enum(["list", "detail", "download"])).optional(),
|
|
11662
|
+
maxLongEdgeRatio: z10.number().positive().optional(),
|
|
11663
|
+
sizing: z10.object({
|
|
11221
11664
|
mode: ContractIdentifierSchema,
|
|
11222
|
-
heightRatio:
|
|
11223
|
-
minHeightPx:
|
|
11224
|
-
maxHeightPx:
|
|
11665
|
+
heightRatio: z10.number().positive().optional(),
|
|
11666
|
+
minHeightPx: z10.number().nonnegative().optional(),
|
|
11667
|
+
maxHeightPx: z10.number().nonnegative().optional()
|
|
11225
11668
|
}).strict().optional(),
|
|
11226
|
-
enhance:
|
|
11227
|
-
enabled:
|
|
11228
|
-
backgroundLumaThreshold:
|
|
11229
|
-
stroke:
|
|
11230
|
-
color:
|
|
11231
|
-
opacity:
|
|
11232
|
-
widthRatio:
|
|
11233
|
-
blurRatio:
|
|
11234
|
-
steps:
|
|
11669
|
+
enhance: z10.object({
|
|
11670
|
+
enabled: z10.boolean().optional(),
|
|
11671
|
+
backgroundLumaThreshold: z10.number().min(0).max(1).optional(),
|
|
11672
|
+
stroke: z10.object({
|
|
11673
|
+
color: z10.string().optional(),
|
|
11674
|
+
opacity: z10.number().min(0).max(1).optional(),
|
|
11675
|
+
widthRatio: z10.number().nonnegative().optional(),
|
|
11676
|
+
blurRatio: z10.number().nonnegative().optional(),
|
|
11677
|
+
steps: z10.number().int().positive().optional()
|
|
11235
11678
|
}).strict().optional()
|
|
11236
11679
|
}).strict().optional()
|
|
11237
11680
|
}).strict().optional(),
|
|
11238
|
-
layoutManagerEnabled:
|
|
11239
|
-
existingToolsDefault:
|
|
11240
|
-
historyColumnsDefault:
|
|
11241
|
-
studioOverrides:
|
|
11681
|
+
layoutManagerEnabled: z10.boolean().optional(),
|
|
11682
|
+
existingToolsDefault: z10.array(ContractIdentifierSchema).optional(),
|
|
11683
|
+
historyColumnsDefault: z10.number().int().min(1).max(6).optional(),
|
|
11684
|
+
studioOverrides: z10.array(WorkbenchStudioOverrideSchema).optional()
|
|
11242
11685
|
}).strict().optional()
|
|
11243
11686
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
11244
11687
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -11262,31 +11705,31 @@ var TenantWorkbenchConfigSchema = z9.object({
|
|
|
11262
11705
|
});
|
|
11263
11706
|
});
|
|
11264
11707
|
});
|
|
11265
|
-
var LoginPageSchema =
|
|
11266
|
-
background:
|
|
11267
|
-
logo:
|
|
11268
|
-
url:
|
|
11269
|
-
lightUrl:
|
|
11270
|
-
darkUrl:
|
|
11271
|
-
position:
|
|
11272
|
-
scale:
|
|
11708
|
+
var LoginPageSchema = z10.object({
|
|
11709
|
+
background: z10.object({ imageUrl: z10.string().optional(), gradient: z10.string().optional() }).strict().optional(),
|
|
11710
|
+
logo: z10.object({
|
|
11711
|
+
url: z10.string().optional(),
|
|
11712
|
+
lightUrl: z10.string().optional(),
|
|
11713
|
+
darkUrl: z10.string().optional(),
|
|
11714
|
+
position: z10.enum(["top", "middle", "bottom"]).optional(),
|
|
11715
|
+
scale: z10.number().positive().optional()
|
|
11273
11716
|
}).strict().optional(),
|
|
11274
|
-
customCss:
|
|
11717
|
+
customCss: z10.string().optional()
|
|
11275
11718
|
}).strict();
|
|
11276
|
-
var LandingPageDefaultConfigSchema =
|
|
11277
|
-
mode:
|
|
11719
|
+
var LandingPageDefaultConfigSchema = z10.object({
|
|
11720
|
+
mode: z10.literal("default")
|
|
11278
11721
|
}).strict();
|
|
11279
|
-
var LandingPageMarkdownConfigSchema =
|
|
11280
|
-
mode:
|
|
11281
|
-
content:
|
|
11722
|
+
var LandingPageMarkdownConfigSchema = z10.object({
|
|
11723
|
+
mode: z10.literal("markdown"),
|
|
11724
|
+
content: z10.string()
|
|
11282
11725
|
}).strict();
|
|
11283
|
-
var LandingPageHtmlConfigSchema =
|
|
11284
|
-
mode:
|
|
11285
|
-
content:
|
|
11726
|
+
var LandingPageHtmlConfigSchema = z10.object({
|
|
11727
|
+
mode: z10.literal("html"),
|
|
11728
|
+
content: z10.string()
|
|
11286
11729
|
}).strict();
|
|
11287
|
-
var LandingPageIframeConfigSchema =
|
|
11288
|
-
mode:
|
|
11289
|
-
url:
|
|
11730
|
+
var LandingPageIframeConfigSchema = z10.object({
|
|
11731
|
+
mode: z10.literal("iframe"),
|
|
11732
|
+
url: z10.string().refine((value) => {
|
|
11290
11733
|
if (/^\/(?!\/)/.test(value)) {
|
|
11291
11734
|
return !value.includes("\\");
|
|
11292
11735
|
}
|
|
@@ -11298,241 +11741,241 @@ var LandingPageIframeConfigSchema = z9.object({
|
|
|
11298
11741
|
}
|
|
11299
11742
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
11300
11743
|
}).strict();
|
|
11301
|
-
var TenantLandingPageConfigSchema =
|
|
11744
|
+
var TenantLandingPageConfigSchema = z10.discriminatedUnion("mode", [
|
|
11302
11745
|
LandingPageDefaultConfigSchema,
|
|
11303
11746
|
LandingPageMarkdownConfigSchema,
|
|
11304
11747
|
LandingPageHtmlConfigSchema,
|
|
11305
11748
|
LandingPageIframeConfigSchema
|
|
11306
11749
|
]);
|
|
11307
|
-
var TenantApplicationConfigSchema =
|
|
11308
|
-
theme:
|
|
11309
|
-
id:
|
|
11310
|
-
name:
|
|
11311
|
-
title:
|
|
11750
|
+
var TenantApplicationConfigSchema = z10.object({
|
|
11751
|
+
theme: z10.object({
|
|
11752
|
+
id: z10.string().optional(),
|
|
11753
|
+
name: z10.string().optional(),
|
|
11754
|
+
title: z10.string().optional(),
|
|
11312
11755
|
favicon: AssetVariantsSchema.optional(),
|
|
11313
11756
|
logo: AssetVariantsSchema.optional(),
|
|
11314
|
-
pwaIcon:
|
|
11315
|
-
form:
|
|
11316
|
-
toast:
|
|
11317
|
-
position:
|
|
11757
|
+
pwaIcon: z10.string().optional(),
|
|
11758
|
+
form: z10.object({ variant: z10.enum(["bento", "ghost"]) }).strict().optional(),
|
|
11759
|
+
toast: z10.object({
|
|
11760
|
+
position: z10.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
|
|
11318
11761
|
}).strict().optional(),
|
|
11319
|
-
icons:
|
|
11320
|
-
views:
|
|
11321
|
-
form:
|
|
11322
|
-
toast:
|
|
11323
|
-
progress:
|
|
11324
|
-
onlyResult:
|
|
11325
|
-
tabular:
|
|
11762
|
+
icons: z10.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
|
|
11763
|
+
views: z10.object({
|
|
11764
|
+
form: z10.object({
|
|
11765
|
+
toast: z10.object({ afterCreate: z10.boolean(), afterDelete: z10.boolean() }).strict(),
|
|
11766
|
+
progress: z10.enum(["estimate", "infinite"]),
|
|
11767
|
+
onlyResult: z10.boolean(),
|
|
11768
|
+
tabular: z10.object({ theme: z10.enum(["default", "tentiary", "primary"]) }).strict()
|
|
11326
11769
|
}).strict()
|
|
11327
11770
|
}).strict().optional(),
|
|
11328
11771
|
loginPage: LoginPageSchema.optional(),
|
|
11329
|
-
extraLanguageURL:
|
|
11330
|
-
hideSpaceHeader:
|
|
11331
|
-
showSidebarTeamSelector:
|
|
11332
|
-
showWorkbenchSidebar:
|
|
11333
|
-
workbenchViewTheme:
|
|
11334
|
-
defaults:
|
|
11335
|
-
showFormInImageDetail:
|
|
11336
|
-
darkMode:
|
|
11337
|
-
language:
|
|
11338
|
-
showDarkModeToggle:
|
|
11339
|
-
showLanguageToggle:
|
|
11772
|
+
extraLanguageURL: z10.record(z10.string(), z10.string()).optional(),
|
|
11773
|
+
hideSpaceHeader: z10.boolean().optional(),
|
|
11774
|
+
showSidebarTeamSelector: z10.boolean().optional(),
|
|
11775
|
+
showWorkbenchSidebar: z10.boolean().optional(),
|
|
11776
|
+
workbenchViewTheme: z10.enum(["default", "bsd-blue"]).optional(),
|
|
11777
|
+
defaults: z10.object({
|
|
11778
|
+
showFormInImageDetail: z10.boolean().optional(),
|
|
11779
|
+
darkMode: z10.enum(["light", "dark", "auto"]).optional(),
|
|
11780
|
+
language: z10.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
|
|
11781
|
+
showDarkModeToggle: z10.boolean().optional(),
|
|
11782
|
+
showLanguageToggle: z10.boolean().optional()
|
|
11340
11783
|
}).strict().optional(),
|
|
11341
|
-
modules:
|
|
11342
|
-
monkeysSpaceSidebar:
|
|
11343
|
-
monkeysSpaceHeadbar:
|
|
11344
|
-
|
|
11345
|
-
|
|
11784
|
+
modules: z10.object({
|
|
11785
|
+
monkeysSpaceSidebar: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]).optional(),
|
|
11786
|
+
monkeysSpaceHeadbar: z10.union([
|
|
11787
|
+
z10.literal("*"),
|
|
11788
|
+
z10.array(TenantHeadbarModuleItemSchema)
|
|
11346
11789
|
]).optional(),
|
|
11347
|
-
settingsSidebar:
|
|
11790
|
+
settingsSidebar: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]).optional()
|
|
11348
11791
|
}).strict().optional(),
|
|
11349
11792
|
headbar: ThemeHeadbarSchema.optional(),
|
|
11350
|
-
kernelLayout:
|
|
11351
|
-
navigationMode:
|
|
11352
|
-
allowNavigationModeSwitch:
|
|
11793
|
+
kernelLayout: z10.object({
|
|
11794
|
+
navigationMode: z10.enum(["sidebar", "topbar"]).optional(),
|
|
11795
|
+
allowNavigationModeSwitch: z10.boolean().optional(),
|
|
11353
11796
|
headbar: KernelHeadbarSchema.optional()
|
|
11354
11797
|
}).strict().optional(),
|
|
11355
|
-
paginationPosition:
|
|
11356
|
-
ugcViewIconOnlyMode:
|
|
11357
|
-
workflowPreviewExecutionGrid:
|
|
11358
|
-
selectionModeDisplayType:
|
|
11359
|
-
clickBehavior:
|
|
11360
|
-
showErrorFilter:
|
|
11361
|
-
displayType:
|
|
11362
|
-
showDetailButton:
|
|
11798
|
+
paginationPosition: z10.enum(["left", "right"]).optional(),
|
|
11799
|
+
ugcViewIconOnlyMode: z10.boolean().optional(),
|
|
11800
|
+
workflowPreviewExecutionGrid: z10.object({
|
|
11801
|
+
selectionModeDisplayType: z10.enum(["operation-button", "dropdown-menu"]).optional(),
|
|
11802
|
+
clickBehavior: z10.enum(["preview", "select", "fill-form", "none"]).optional(),
|
|
11803
|
+
showErrorFilter: z10.boolean().optional(),
|
|
11804
|
+
displayType: z10.enum(["grid", "masonry"]).optional(),
|
|
11805
|
+
showDetailButton: z10.boolean().optional()
|
|
11363
11806
|
}).strict().optional(),
|
|
11364
|
-
workbenchSidebarDefaultOpen:
|
|
11365
|
-
workbenchSidebarMoreAction:
|
|
11366
|
-
workbenchSidebarApart:
|
|
11367
|
-
workbenchSidebarToggleGroupDetail:
|
|
11368
|
-
workbenchSidebarViewType:
|
|
11369
|
-
workbenchSidebarFormViewEmbed:
|
|
11370
|
-
workbenchSidebarModernMode:
|
|
11371
|
-
ugc:
|
|
11372
|
-
uniImagePreview:
|
|
11373
|
-
imagePreviewStyle:
|
|
11374
|
-
teamAsUser:
|
|
11375
|
-
themeMode:
|
|
11376
|
-
density:
|
|
11377
|
-
pageZoom:
|
|
11378
|
-
miniMode:
|
|
11379
|
-
workflow:
|
|
11380
|
-
historyResult:
|
|
11381
|
-
uploader:
|
|
11382
|
-
orientation:
|
|
11383
|
-
pasteButton:
|
|
11384
|
-
statusText:
|
|
11807
|
+
workbenchSidebarDefaultOpen: z10.boolean().optional(),
|
|
11808
|
+
workbenchSidebarMoreAction: z10.boolean().optional(),
|
|
11809
|
+
workbenchSidebarApart: z10.boolean().optional(),
|
|
11810
|
+
workbenchSidebarToggleGroupDetail: z10.boolean().optional(),
|
|
11811
|
+
workbenchSidebarViewType: z10.boolean().optional(),
|
|
11812
|
+
workbenchSidebarFormViewEmbed: z10.boolean().optional(),
|
|
11813
|
+
workbenchSidebarModernMode: z10.boolean().optional(),
|
|
11814
|
+
ugc: z10.object({ onItemClick: z10.boolean(), subtitle: z10.boolean().optional() }).strict().optional(),
|
|
11815
|
+
uniImagePreview: z10.boolean().optional(),
|
|
11816
|
+
imagePreviewStyle: z10.union([z10.literal(false), z10.enum(["simple", "normal", "uni"])]).optional(),
|
|
11817
|
+
teamAsUser: z10.boolean().optional(),
|
|
11818
|
+
themeMode: z10.enum(["shadow", "border"]).optional(),
|
|
11819
|
+
density: z10.enum(["compact", "default", "comfortable"]).optional(),
|
|
11820
|
+
pageZoom: z10.number().positive().optional(),
|
|
11821
|
+
miniMode: z10.object({ showPreviewViewExecutionResultGrid: z10.boolean() }).strict().optional(),
|
|
11822
|
+
workflow: z10.object({ allowConcurrentRuns: z10.boolean() }).strict().optional(),
|
|
11823
|
+
historyResult: z10.object({ display: z10.boolean() }).strict().optional(),
|
|
11824
|
+
uploader: z10.object({
|
|
11825
|
+
orientation: z10.enum(["vertical", "horizontal"]),
|
|
11826
|
+
pasteButton: z10.boolean(),
|
|
11827
|
+
statusText: z10.boolean()
|
|
11385
11828
|
}).strict().optional(),
|
|
11386
|
-
designProjects:
|
|
11387
|
-
oneOnOne:
|
|
11388
|
-
newTabOpenBoard:
|
|
11389
|
-
defaultShowGrid:
|
|
11390
|
-
createDefaultFrame:
|
|
11391
|
-
showPageMenu:
|
|
11392
|
-
showMainMenu:
|
|
11393
|
-
showStylePanel:
|
|
11394
|
-
showToolbar:
|
|
11395
|
-
toolbarPosition:
|
|
11396
|
-
showContextMenu:
|
|
11397
|
-
showActionsMenu:
|
|
11398
|
-
showPageAndLayerSidebar:
|
|
11399
|
-
showBoardOperationSidebar:
|
|
11400
|
-
showMiniToolsToolbar:
|
|
11401
|
-
showRightSidebar:
|
|
11402
|
-
showRealtimeDrawing:
|
|
11403
|
-
showWorkflow:
|
|
11404
|
-
showVersionManager:
|
|
11405
|
-
showAgent:
|
|
11406
|
-
AgentTools:
|
|
11829
|
+
designProjects: z10.object({
|
|
11830
|
+
oneOnOne: z10.boolean(),
|
|
11831
|
+
newTabOpenBoard: z10.boolean(),
|
|
11832
|
+
defaultShowGrid: z10.boolean().optional(),
|
|
11833
|
+
createDefaultFrame: z10.boolean(),
|
|
11834
|
+
showPageMenu: z10.boolean(),
|
|
11835
|
+
showMainMenu: z10.boolean(),
|
|
11836
|
+
showStylePanel: z10.boolean(),
|
|
11837
|
+
showToolbar: z10.boolean(),
|
|
11838
|
+
toolbarPosition: z10.enum(["bottom", "left"]).optional(),
|
|
11839
|
+
showContextMenu: z10.boolean(),
|
|
11840
|
+
showActionsMenu: z10.boolean(),
|
|
11841
|
+
showPageAndLayerSidebar: z10.boolean().optional(),
|
|
11842
|
+
showBoardOperationSidebar: z10.boolean().optional(),
|
|
11843
|
+
showMiniToolsToolbar: z10.boolean().optional(),
|
|
11844
|
+
showRightSidebar: z10.boolean().optional(),
|
|
11845
|
+
showRealtimeDrawing: z10.boolean().optional(),
|
|
11846
|
+
showWorkflow: z10.boolean().optional(),
|
|
11847
|
+
showVersionManager: z10.boolean().optional(),
|
|
11848
|
+
showAgent: z10.boolean().optional(),
|
|
11849
|
+
AgentTools: z10.array(ContractIdentifierSchema).optional()
|
|
11407
11850
|
}).strict().optional(),
|
|
11408
11851
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
11409
|
-
visionProWorkflows:
|
|
11410
|
-
initTeam:
|
|
11411
|
-
imageThumbnail:
|
|
11412
|
-
pages:
|
|
11413
|
-
allowPageKeys:
|
|
11852
|
+
visionProWorkflows: z10.array(ContractIdentifierSchema).optional(),
|
|
11853
|
+
initTeam: z10.boolean().optional(),
|
|
11854
|
+
imageThumbnail: z10.boolean().optional(),
|
|
11855
|
+
pages: z10.object({
|
|
11856
|
+
allowPageKeys: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]),
|
|
11414
11857
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11415
11858
|
}).strict().optional(),
|
|
11416
|
-
agent:
|
|
11859
|
+
agent: z10.object({
|
|
11417
11860
|
logo: AssetVariantsSchema.optional(),
|
|
11418
|
-
brandDisplayMode:
|
|
11419
|
-
density:
|
|
11861
|
+
brandDisplayMode: z10.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
11862
|
+
density: z10.enum(["compact", "default", "comfortable"]).optional()
|
|
11420
11863
|
}).strict().optional()
|
|
11421
11864
|
}).strict(),
|
|
11422
11865
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11423
|
-
auth:
|
|
11424
|
-
enabled:
|
|
11425
|
-
oidc:
|
|
11426
|
-
password:
|
|
11427
|
-
hideAuthToast:
|
|
11428
|
-
autoReload:
|
|
11429
|
-
defaultOtherTeam:
|
|
11866
|
+
auth: z10.object({
|
|
11867
|
+
enabled: z10.array(ContractIdentifierSchema).default([]),
|
|
11868
|
+
oidc: z10.object({ buttonText: z10.string().optional(), autoSignin: z10.boolean().optional() }).strict().optional(),
|
|
11869
|
+
password: z10.object({ disableAutoRegister: z10.boolean().optional() }).strict().optional(),
|
|
11870
|
+
hideAuthToast: z10.boolean().optional(),
|
|
11871
|
+
autoReload: z10.boolean().optional(),
|
|
11872
|
+
defaultOtherTeam: z10.boolean().optional()
|
|
11430
11873
|
}).strict(),
|
|
11431
|
-
endpoints:
|
|
11432
|
-
module:
|
|
11433
|
-
behavior:
|
|
11434
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11435
|
-
autoApproveOAuth:
|
|
11436
|
-
rememberWorkflowModelSelection:
|
|
11874
|
+
endpoints: z10.record(ContractIdentifierSchema, z10.string()),
|
|
11875
|
+
module: z10.union([z10.literal("*"), z10.array(ContractIdentifierSchema)]),
|
|
11876
|
+
behavior: z10.object({
|
|
11877
|
+
clearWorkflowFormStorageAfterUpdate: z10.boolean().optional(),
|
|
11878
|
+
autoApproveOAuth: z10.boolean().optional(),
|
|
11879
|
+
rememberWorkflowModelSelection: z10.boolean().optional()
|
|
11437
11880
|
}).strict(),
|
|
11438
|
-
dataManagement:
|
|
11439
|
-
favoriteOntologyId:
|
|
11440
|
-
pairedOntologyId:
|
|
11441
|
-
galleryOntologyId:
|
|
11442
|
-
dataBrowserDefaultOntologyId:
|
|
11443
|
-
workflowResultOntologyId:
|
|
11444
|
-
homeAdvertisement:
|
|
11881
|
+
dataManagement: z10.object({
|
|
11882
|
+
favoriteOntologyId: z10.string().optional(),
|
|
11883
|
+
pairedOntologyId: z10.string().optional(),
|
|
11884
|
+
galleryOntologyId: z10.string().optional(),
|
|
11885
|
+
dataBrowserDefaultOntologyId: z10.string().optional(),
|
|
11886
|
+
workflowResultOntologyId: z10.string().optional(),
|
|
11887
|
+
homeAdvertisement: z10.object({
|
|
11445
11888
|
ontologyId: ContractIdentifierSchema,
|
|
11446
11889
|
viewId: ContractIdentifierSchema.optional(),
|
|
11447
|
-
viewType:
|
|
11890
|
+
viewType: z10.enum(["filter", "container", "share_link"]).optional(),
|
|
11448
11891
|
teamId: ContractIdentifierSchema.optional(),
|
|
11449
|
-
teamOnly:
|
|
11450
|
-
pageSize:
|
|
11451
|
-
sortBy:
|
|
11452
|
-
sortOrder:
|
|
11453
|
-
fieldMap:
|
|
11454
|
-
columnIds:
|
|
11892
|
+
teamOnly: z10.boolean().optional(),
|
|
11893
|
+
pageSize: z10.number().int().positive().optional(),
|
|
11894
|
+
sortBy: z10.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
|
|
11895
|
+
sortOrder: z10.enum(["asc", "desc"]).optional(),
|
|
11896
|
+
fieldMap: z10.record(z10.string(), z10.string()).optional(),
|
|
11897
|
+
columnIds: z10.record(z10.string(), z10.string()).optional()
|
|
11455
11898
|
}).strict().optional(),
|
|
11456
|
-
homeTrendAssistant:
|
|
11899
|
+
homeTrendAssistant: z10.object({
|
|
11457
11900
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11458
11901
|
viewId: ContractIdentifierSchema.optional(),
|
|
11459
11902
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11460
|
-
viewName:
|
|
11903
|
+
viewName: z10.string().optional(),
|
|
11461
11904
|
teamId: ContractIdentifierSchema.optional(),
|
|
11462
11905
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11463
|
-
tep:
|
|
11464
|
-
runtime:
|
|
11906
|
+
tep: z10.object({ baseUrl: z10.string().optional(), timeoutMs: z10.number().int().positive().optional() }).strict().optional(),
|
|
11907
|
+
runtime: z10.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z10.boolean(), tepAuthorizationConfigured: z10.boolean(), tepCookieConfigured: z10.boolean() }).strict().optional()
|
|
11465
11908
|
}).strict().optional(),
|
|
11466
|
-
sharing:
|
|
11467
|
-
silentViewLinks:
|
|
11468
|
-
shareAccess:
|
|
11469
|
-
shareDialog:
|
|
11470
|
-
audience:
|
|
11471
|
-
accessLevel:
|
|
11472
|
-
viewTreeDelivery:
|
|
11909
|
+
sharing: z10.object({
|
|
11910
|
+
silentViewLinks: z10.object({ enabled: z10.boolean().optional(), placement: z10.object({ mode: z10.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
|
|
11911
|
+
shareAccess: z10.object({ publicLinksEnabled: z10.boolean().optional(), passwordGateEnabled: z10.boolean().optional(), passwordAccessTtlSeconds: z10.number().int().positive().optional(), defaultViewTreeDelivery: z10.enum(["manual", "auto"]).optional() }).strict().optional(),
|
|
11912
|
+
shareDialog: z10.object({
|
|
11913
|
+
audience: z10.object({ enabled: z10.boolean().optional(), allowed: z10.array(z10.enum(["user", "team", "public"])).optional(), default: z10.enum(["user", "team", "public"]).optional() }).strict().optional(),
|
|
11914
|
+
accessLevel: z10.object({ enabled: z10.boolean().optional(), allowed: z10.array(z10.enum(["read", "write"])).optional(), default: z10.enum(["read", "write"]).optional() }).strict().optional(),
|
|
11915
|
+
viewTreeDelivery: z10.object({ enabled: z10.boolean().optional(), allowed: z10.array(z10.enum(["manual", "auto"])).optional(), default: z10.enum(["manual", "auto"]).optional() }).strict().optional()
|
|
11473
11916
|
}).strict().optional()
|
|
11474
11917
|
}).strict().optional()
|
|
11475
11918
|
}).strict().optional(),
|
|
11476
|
-
compute:
|
|
11477
|
-
integrations:
|
|
11478
|
-
harbor:
|
|
11479
|
-
gitlab:
|
|
11480
|
-
kubernetes:
|
|
11919
|
+
compute: z10.object({
|
|
11920
|
+
integrations: z10.object({
|
|
11921
|
+
harbor: z10.object({ endpoint: z10.string().optional(), projectScopes: z10.array(z10.string()).optional(), authMode: z10.string().optional(), principal: z10.string().optional(), autoSync: z10.boolean().optional(), proxyUrl: z10.string().optional() }).strict().optional(),
|
|
11922
|
+
gitlab: z10.object({ baseUrl: z10.string().optional(), groupScopes: z10.array(z10.string()).optional(), tokenMode: z10.string().optional(), deployProjectPath: z10.string().optional(), deploymentReportsEnabled: z10.boolean().optional(), proxyUrl: z10.string().optional() }).strict().optional(),
|
|
11923
|
+
kubernetes: z10.object({ accessMode: z10.string().optional(), clusterAlias: z10.string().optional(), agentProjectPath: z10.string().optional(), agentName: z10.string().optional(), namespaceScopes: z10.array(z10.string()).optional(), rolloutObserverEnabled: z10.boolean().optional(), proxyUrl: z10.string().optional() }).strict().optional()
|
|
11481
11924
|
}).strict().optional()
|
|
11482
11925
|
}).strict().optional(),
|
|
11483
|
-
data:
|
|
11484
|
-
storage:
|
|
11485
|
-
presignMode:
|
|
11486
|
-
presign:
|
|
11487
|
-
expiresInSeconds:
|
|
11488
|
-
buckets:
|
|
11489
|
-
|
|
11926
|
+
data: z10.object({}).strict().optional(),
|
|
11927
|
+
storage: z10.object({
|
|
11928
|
+
presignMode: z10.enum(["frontend", "backend", "both"]).optional(),
|
|
11929
|
+
presign: z10.object({
|
|
11930
|
+
expiresInSeconds: z10.number().int().positive(),
|
|
11931
|
+
buckets: z10.array(
|
|
11932
|
+
z10.object({
|
|
11490
11933
|
id: ContractIdentifierSchema,
|
|
11491
11934
|
provider: ContractIdentifierSchema,
|
|
11492
11935
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11493
|
-
urlPatterns:
|
|
11494
|
-
|
|
11936
|
+
urlPatterns: z10.array(
|
|
11937
|
+
z10.object({
|
|
11495
11938
|
id: ContractIdentifierSchema,
|
|
11496
|
-
type:
|
|
11497
|
-
hostname:
|
|
11498
|
-
preferred:
|
|
11499
|
-
bucketSegment:
|
|
11939
|
+
type: z10.enum(["bucket-hostname", "provider-hostname"]),
|
|
11940
|
+
hostname: z10.string().trim().min(1),
|
|
11941
|
+
preferred: z10.boolean().optional(),
|
|
11942
|
+
bucketSegment: z10.string().optional()
|
|
11500
11943
|
}).strict()
|
|
11501
11944
|
)
|
|
11502
11945
|
}).strict()
|
|
11503
11946
|
)
|
|
11504
11947
|
}).strict().optional()
|
|
11505
11948
|
}).strict().optional(),
|
|
11506
|
-
monkeyData:
|
|
11949
|
+
monkeyData: z10.object({ baseUrl: z10.string().optional() }).strict().optional()
|
|
11507
11950
|
}).strict();
|
|
11508
|
-
var TenantProductConfigSchema =
|
|
11509
|
-
contract:
|
|
11951
|
+
var TenantProductConfigSchema = z10.object({
|
|
11952
|
+
contract: z10.literal("TenantProductConfig"),
|
|
11510
11953
|
tenantId: ContractIdentifierSchema,
|
|
11511
11954
|
appId: ContractIdentifierSchema,
|
|
11512
11955
|
environment: ContractIdentifierSchema,
|
|
11513
11956
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11514
|
-
moduleRefs:
|
|
11515
|
-
pageRefs:
|
|
11516
|
-
featureFlags:
|
|
11957
|
+
moduleRefs: z10.array(ContractIdentifierSchema).default([]),
|
|
11958
|
+
pageRefs: z10.array(ContractIdentifierSchema).default([]),
|
|
11959
|
+
featureFlags: z10.record(z10.string(), z10.boolean()).default({}),
|
|
11517
11960
|
authBinding: TenantAuthBindingsSchema,
|
|
11518
11961
|
dataBinding: TenantDataBindingsSchema,
|
|
11519
|
-
sourceMap:
|
|
11520
|
-
warnings:
|
|
11962
|
+
sourceMap: z10.record(z10.string(), ContractIdentifierSchema),
|
|
11963
|
+
warnings: z10.array(z10.string()).default([]),
|
|
11521
11964
|
applicationConfig: TenantApplicationConfigSchema
|
|
11522
11965
|
}).strict();
|
|
11523
|
-
var TenantRuntimeConfigSchema =
|
|
11524
|
-
contract:
|
|
11966
|
+
var TenantRuntimeConfigSchema = z10.object({
|
|
11967
|
+
contract: z10.literal("TenantRuntimeConfig"),
|
|
11525
11968
|
tenantId: ContractIdentifierSchema,
|
|
11526
11969
|
appId: ContractIdentifierSchema,
|
|
11527
11970
|
environment: ContractIdentifierSchema,
|
|
11528
11971
|
designTokens: ResolvedThemeTokensSchema,
|
|
11529
|
-
moduleRefs:
|
|
11530
|
-
pageRefs:
|
|
11531
|
-
featureFlags:
|
|
11972
|
+
moduleRefs: z10.array(ContractIdentifierSchema).default([]),
|
|
11973
|
+
pageRefs: z10.array(ContractIdentifierSchema).default([]),
|
|
11974
|
+
featureFlags: z10.record(z10.string(), z10.boolean()).default({}),
|
|
11532
11975
|
authBinding: TenantAuthBindingsSchema,
|
|
11533
11976
|
dataBinding: TenantDataBindingsSchema,
|
|
11534
|
-
sourceMap:
|
|
11535
|
-
warnings:
|
|
11977
|
+
sourceMap: z10.record(z10.string(), ContractIdentifierSchema),
|
|
11978
|
+
warnings: z10.array(z10.string()).default([]),
|
|
11536
11979
|
applicationConfig: TenantApplicationConfigSchema
|
|
11537
11980
|
}).strict();
|
|
11538
11981
|
|
|
@@ -11827,6 +12270,7 @@ export {
|
|
|
11827
12270
|
compileViewProviderRegistry,
|
|
11828
12271
|
compileWorkflowDefinitionFromConductor,
|
|
11829
12272
|
compileWorkflowPersistenceProjection,
|
|
12273
|
+
createAgentSessionEventProjection,
|
|
11830
12274
|
createCapabilityRegistrySource,
|
|
11831
12275
|
createOpenApiCapabilityRegistrySource,
|
|
11832
12276
|
createToolCapabilityManifest,
|
|
@@ -11834,10 +12278,12 @@ export {
|
|
|
11834
12278
|
extractOpenApiCapabilityManifests,
|
|
11835
12279
|
mergeThemeTokenDocuments,
|
|
11836
12280
|
parseApplicationHandoff,
|
|
12281
|
+
projectAgentSessionEvents,
|
|
11837
12282
|
publishOpenApiToolCapabilityManifests,
|
|
11838
12283
|
readApplicationHandoffFromUrl,
|
|
11839
12284
|
resolveThemeTokens,
|
|
11840
12285
|
serializeApplicationHandoff,
|
|
12286
|
+
toAgentSessionViewModel,
|
|
11841
12287
|
validateDomainCommand,
|
|
11842
12288
|
validateThemeTokensDocument,
|
|
11843
12289
|
validateThemeTokensDocumentStructure
|