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