@inf-monkeys-tech/monkeys 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7089,39 +7089,260 @@ var CapabilityRegistryDocumentSchema = z4.object({
7089
7089
  });
7090
7090
  });
7091
7091
 
7092
- // src/contracts/context.ts
7092
+ // src/contracts/agent.ts
7093
7093
  import { z as z5 } from "zod";
7094
- var ActorRefSchema = z5.object({
7095
- kind: z5.enum(["human", "agent", "service", "tenant", "public"]),
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 = z5.object({
7322
+ var AuthorityScopeSchema = z6.object({
7102
7323
  resource: ContractIdentifierSchema,
7103
- actions: z5.array(ContractIdentifierSchema).min(1),
7104
- constraints: z5.record(z5.string(), JsonValueSchema).optional()
7324
+ actions: z6.array(ContractIdentifierSchema).min(1),
7325
+ constraints: z6.record(z6.string(), JsonValueSchema).optional()
7105
7326
  }).strict();
7106
- var RequestScopeSchema = z5.object({
7107
- contract: z5.literal("RequestScope"),
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: z5.object({
7335
+ session: z6.object({
7115
7336
  authType: ContractIdentifierSchema,
7116
- authenticated: z5.boolean(),
7117
- membershipVerified: z5.boolean()
7337
+ authenticated: z6.boolean(),
7338
+ membershipVerified: z6.boolean()
7118
7339
  }).strict(),
7119
- permissionCodes: z5.array(ContractIdentifierSchema).default([]),
7120
- authority: z5.array(AuthorityScopeSchema).default([]),
7340
+ permissionCodes: z6.array(ContractIdentifierSchema).default([]),
7341
+ authority: z6.array(AuthorityScopeSchema).default([]),
7121
7342
  issuedAt: IsoDateTimeSchema
7122
7343
  }).strict();
7123
- var ExecutionLinkSchema = z5.object({
7124
- contract: z5.literal("ExecutionLink"),
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 = z5.object({
7135
- contract: z5.literal("CompletionHeader"),
7355
+ var CompletionHeaderSchema = z6.object({
7356
+ contract: z6.literal("CompletionHeader"),
7136
7357
  eventId: ContractIdentifierSchema,
7137
7358
  runtimeEventId: ContractIdentifierSchema,
7138
7359
  idempotencyKey: ContractIdentifierSchema,
7139
- sequence: z5.number().int().nonnegative(),
7360
+ sequence: z6.number().int().nonnegative(),
7140
7361
  execution: ExecutionLinkSchema,
7141
- producer: z5.object({
7362
+ producer: z6.object({
7142
7363
  service: ContractIdentifierSchema,
7143
7364
  runtime: ContractIdentifierSchema,
7144
7365
  version: ContractIdentifierSchema
7145
7366
  }).strict(),
7146
- status: z5.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
7367
+ status: z6.enum(["SUCCEEDED", "FAILED", "CANCELLED", "TIMED_OUT"]),
7147
7368
  occurredAt: IsoDateTimeSchema,
7148
7369
  payloadSchemaRef: ContractIdentifierSchema.optional()
7149
7370
  }).strict();
7150
- var CompletionEventSchema = z5.object({
7371
+ var CompletionEventSchema = z6.object({
7151
7372
  header: CompletionHeaderSchema,
7152
7373
  payload: JsonValueSchema.optional()
7153
7374
  }).strict();
7154
- var AgentRuntimeEventSchema = z5.object({
7155
- contract: z5.literal("AgentRuntimeEvent"),
7375
+ var AgentRuntimeEventSchema = z6.object({
7376
+ contract: z6.literal("AgentRuntimeEvent"),
7156
7377
  runtimeEventId: ContractIdentifierSchema,
7157
7378
  streamId: ContractIdentifierSchema,
7158
- sequence: z5.number().int().nonnegative(),
7379
+ sequence: z6.number().int().nonnegative(),
7159
7380
  requestId: ContractIdentifierSchema,
7160
7381
  teamId: ContractIdentifierSchema,
7161
7382
  threadId: ContractIdentifierSchema.optional(),
7162
- eventType: z5.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert"]),
7383
+ eventType: z6.enum(["messages:append", "messages:update", "thread:update", "tool-call:upsert", "session:event"]),
7163
7384
  payload: JsonValueSchema,
7164
7385
  occurredAt: IsoDateTimeSchema
7165
7386
  }).strict();
7166
7387
 
7167
7388
  // src/contracts/continuity.ts
7168
- import { z as z6 } from "zod";
7169
- var DataContinuityEnvelopeSchema = z6.object({
7170
- contract: z6.literal("DataContinuityEnvelope"),
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 = z6.object({
7186
- contract: z6.literal("BodyRelationRecord"),
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: z6.enum(["tenant", "team", "global"]),
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 = z6.object({
7198
- contract: z6.literal("ApplicationRun"),
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: z6.enum(["PENDING", "RUNNING", "COMPLETED", "FAILED", "CANCELLED", "EXPIRED"]),
7205
- inputRefs: z6.array(EntityRefSchema).default([]),
7206
- outputRefs: z6.array(EntityRefSchema).default([]),
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 = z6.object({
7213
- contract: z6.literal("ExpiringAccessGrant"),
7433
+ var ExpiringAccessGrantSchema = z7.object({
7434
+ contract: z7.literal("ExpiringAccessGrant"),
7214
7435
  grantId: ContractIdentifierSchema,
7215
7436
  subjectRef: EntityRefSchema,
7216
7437
  resourceRef: EntityRefSchema,
7217
- permissions: z6.array(ContractIdentifierSchema).min(1),
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 z7 } from "zod";
7225
- var SourceRecordRefSchema = z7.object({
7445
+ import { z as z8 } from "zod";
7446
+ var SourceRecordRefSchema = z8.object({
7226
7447
  sourceId: ContractIdentifierSchema,
7227
7448
  recordId: ContractIdentifierSchema,
7228
- recordVersion: z7.union([z7.number().int().nonnegative(), ContractIdentifierSchema]),
7449
+ recordVersion: z8.union([z8.number().int().nonnegative(), ContractIdentifierSchema]),
7229
7450
  hash: Sha256Schema
7230
7451
  }).strict();
7231
- var OntologyDefinitionSchema = z7.object({
7232
- contract: z7.literal("OntologyDefinition"),
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: z7.object({
7458
+ authority: z8.object({
7238
7459
  service: ContractIdentifierSchema,
7239
7460
  storage: ContractIdentifierSchema,
7240
- scope: z7.enum(["tenant", "team", "user", "global"])
7461
+ scope: z8.enum(["tenant", "team", "user", "global"])
7241
7462
  }).strict(),
7242
- relationKinds: z7.array(ContractIdentifierSchema).default([]),
7243
- metricKinds: z7.array(ContractIdentifierSchema).default([])
7463
+ relationKinds: z8.array(ContractIdentifierSchema).default([]),
7464
+ metricKinds: z8.array(ContractIdentifierSchema).default([])
7244
7465
  }).strict();
7245
- var ProjectionSpecSchema = z7.object({
7246
- contract: z7.literal("ProjectionSpec"),
7466
+ var ProjectionSpecSchema = z8.object({
7467
+ contract: z8.literal("ProjectionSpec"),
7247
7468
  projectionId: ContractIdentifierSchema,
7248
- ontologyIds: z7.array(ContractIdentifierSchema).min(1),
7469
+ ontologyIds: z8.array(ContractIdentifierSchema).min(1),
7249
7470
  outputSchemaRef: ContractIdentifierSchema,
7250
- operator: z7.object({
7251
- kind: z7.enum(["query", "aggregate", "relationship", "search", "custom"]),
7252
- configuration: z7.record(z7.string(), JsonValueSchema).default({})
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: z7.enum(["on-demand", "event-driven", "scheduled"]),
7255
- invalidationEvents: z7.array(ContractIdentifierSchema).default([]),
7256
- rebuildable: z7.literal(true),
7257
- lineagePolicy: z7.object({
7258
- sourceRecords: z7.boolean(),
7259
- bodyVersions: z7.boolean(),
7260
- runRefs: z7.boolean(),
7261
- actorRefs: z7.boolean()
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 = z7.object({
7265
- contract: z7.literal("LineageRecord"),
7485
+ var LineageRecordSchema = z8.object({
7486
+ contract: z8.literal("LineageRecord"),
7266
7487
  lineageId: ContractIdentifierSchema,
7267
7488
  subjectRef: EntityRefSchema,
7268
- sourceRecords: z7.array(SourceRecordRefSchema).default([]),
7269
- bodyRefs: z7.array(EntityRefSchema).default([]),
7270
- runRefs: z7.array(EntityRefSchema).default([]),
7271
- outputRefs: z7.array(EntityRefSchema).default([]),
7272
- artifactRefs: z7.array(EntityRefSchema).default([]),
7273
- actorRefs: z7.array(EntityRefSchema).default([]),
7274
- evidenceRefs: z7.array(EntityRefSchema).default([]),
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 = z7.object({
7278
- contract: z7.literal("DomainEvent"),
7498
+ var DomainEventSchema = z8.object({
7499
+ contract: z8.literal("DomainEvent"),
7279
7500
  eventId: ContractIdentifierSchema,
7280
7501
  eventType: ContractIdentifierSchema,
7281
7502
  aggregateRef: EntityRefSchema,
7282
- aggregateVersion: z7.number().int().nonnegative(),
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 z8 } from "zod";
7291
- var PageTypeSchema = z8.enum([
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 = z8.object({
7313
- authenticated: z8.boolean().default(true),
7314
- permissionAllOf: z8.array(ContractIdentifierSchema).default([]),
7315
- permissionAnyOf: z8.array(ContractIdentifierSchema).default([]),
7316
- featureFlags: z8.array(ContractIdentifierSchema).default([]),
7317
- productContexts: z8.array(z8.enum(["studio", "kernel", "compute"])).min(1)
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 = z8.string().trim().regex(/^\/(?!\/)/, "Expected an application-relative route path.");
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 = z8.object({
7344
- contract: z8.literal("PageDefinition"),
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: z8.object({
7570
+ ownership: z9.object({
7350
7571
  teamId: ContractIdentifierSchema.optional(),
7351
7572
  creatorRef: EntityRefSchema.optional(),
7352
7573
  studioId: ContractIdentifierSchema.optional(),
7353
- builtIn: z8.boolean()
7574
+ builtIn: z9.boolean()
7354
7575
  }).strict(),
7355
- record: z8.object({
7356
- createdTimestamp: z8.number().int().nonnegative().optional(),
7357
- updatedTimestamp: z8.number().int().nonnegative().optional(),
7358
- deleted: z8.boolean().default(false)
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: z8.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
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: z8.array(EntityRefSchema).default([]),
7586
+ capabilityRefs: z9.array(EntityRefSchema).default([]),
7366
7587
  workflowRef: EntityRefSchema.optional(),
7367
- binding: z8.object({
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: z8.object({
7374
- actions: z8.array(z8.enum(["read", "write", "execute", "manage-permissions"])).default([])
7594
+ access: z9.object({
7595
+ actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"])).default([])
7375
7596
  }).strict(),
7376
- rendererConfig: z8.object({
7597
+ rendererConfig: z9.object({
7377
7598
  schemaRef: ContractIdentifierSchema,
7378
7599
  value: JsonObjectSchema
7379
7600
  }).strict(),
7380
- navigation: z8.object({
7601
+ navigation: z9.object({
7381
7602
  label: LocalizedTextSchema,
7382
7603
  iconRef: ContractIdentifierSchema.optional(),
7383
7604
  parentPageId: ContractIdentifierSchema.optional(),
7384
- order: z8.number().int().optional(),
7385
- hidden: z8.boolean().default(false),
7386
- pinned: z8.boolean().default(false)
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 = z8.object({
7408
- contract: z8.literal("PageRuntimeDescriptor"),
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: z8.object({
7637
+ surface: z9.object({
7417
7638
  frameOwner: ContractIdentifierSchema,
7418
7639
  tone: ContractIdentifierSchema.optional(),
7419
- density: z8.enum(["compact", "default", "comfortable"]).default("default")
7640
+ density: z9.enum(["compact", "default", "comfortable"]).default("default")
7420
7641
  }).strict(),
7421
- scroll: z8.object({
7422
- owner: z8.enum(["page", "surface", "provider"]),
7423
- axis: z8.enum(["x", "y", "both", "none"]),
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: z8.boolean().default(false)
7646
+ virtualized: z9.boolean().default(false)
7426
7647
  }).strict(),
7427
- activation: z8.enum(["navigate", "select", "drawer", "modal", "fullscreen"]),
7428
- lifecycle: z8.object({
7429
- mountPolicy: z8.enum(["always", "when-visible", "when-active"]),
7430
- queryPolicy: z8.enum(["always", "when-visible", "when-active", "manual"]),
7431
- deepLink: z8.boolean(),
7432
- focusReturn: z8.boolean()
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 = z8.object({
7656
+ var PageRouteProjectionSchema = z9.object({
7436
7657
  pageId: ContractIdentifierSchema,
7437
7658
  routeId: ContractIdentifierSchema,
7438
7659
  path: PageRoutePathSchema
7439
7660
  }).strict();
7440
- var PageNavigationProjectionSchema = z8.object({
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: z8.number().int().optional(),
7448
- pinned: z8.boolean()
7668
+ order: z9.number().int().optional(),
7669
+ pinned: z9.boolean()
7449
7670
  }).strict();
7450
- var PageGuardProjectionSchema = z8.object({
7671
+ var PageGuardProjectionSchema = z9.object({
7451
7672
  pageId: ContractIdentifierSchema,
7452
- authenticated: z8.boolean(),
7453
- permissionAllOf: z8.array(ContractIdentifierSchema),
7454
- permissionAnyOf: z8.array(ContractIdentifierSchema),
7455
- featureFlags: z8.array(ContractIdentifierSchema),
7456
- actions: z8.array(z8.enum(["read", "write", "execute", "manage-permissions"]))
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 = z8.object({
7679
+ var PageRendererProjectionSchema = z9.object({
7459
7680
  pageId: ContractIdentifierSchema,
7460
- surface: z8.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7681
+ surface: z9.enum(["page", "workspace", "view", "record", "action", "overlay", "agent"]),
7461
7682
  rendererKey: ContractIdentifierSchema,
7462
7683
  capabilityRef: EntityRefSchema,
7463
- capabilityRefs: z8.array(EntityRefSchema),
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 = z8.object({
7505
- contract: z8.literal("PageRuntimeProjection"),
7506
- product: z8.enum(["studio", "kernel", "compute"]),
7507
- routes: z8.array(PageRouteProjectionSchema),
7508
- navigation: z8.array(PageNavigationProjectionSchema),
7509
- guards: z8.array(PageGuardProjectionSchema),
7510
- renderers: z8.array(PageRendererProjectionSchema)
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 z9 } from "zod";
7567
- var ConceptRelationshipSchema = z9.object({
7787
+ import { z as z10 } from "zod";
7788
+ var ConceptRelationshipSchema = z10.object({
7568
7789
  kind: ContractIdentifierSchema,
7569
7790
  targetConceptId: ContractIdentifierSchema,
7570
- cardinality: z9.enum(["one", "optional", "many"])
7791
+ cardinality: z10.enum(["one", "optional", "many"])
7571
7792
  }).strict();
7572
- var ConceptDefinitionSchema = z9.object({
7573
- contract: z9.literal("ConceptDefinition"),
7793
+ var ConceptDefinitionSchema = z10.object({
7794
+ contract: z10.literal("ConceptDefinition"),
7574
7795
  conceptId: ContractIdentifierSchema,
7575
7796
  ownerRepo: ContractIdentifierSchema,
7576
- displayName: z9.string().trim().min(1),
7577
- description: z9.string().optional(),
7797
+ displayName: z10.string().trim().min(1),
7798
+ description: z10.string().optional(),
7578
7799
  schemaRef: ContractIdentifierSchema,
7579
7800
  ontologyId: ContractIdentifierSchema.optional(),
7580
- capabilityIds: z9.array(ContractIdentifierSchema).default([]),
7581
- commandNames: z9.array(ContractIdentifierSchema).default([]),
7582
- relationships: z9.array(ConceptRelationshipSchema).default([])
7801
+ capabilityIds: z10.array(ContractIdentifierSchema).default([]),
7802
+ commandNames: z10.array(ContractIdentifierSchema).default([]),
7803
+ relationships: z10.array(ConceptRelationshipSchema).default([])
7583
7804
  }).strict();
7584
- var DomainCommandDefinitionSchema = z9.object({
7585
- contract: z9.literal("DomainCommandDefinition"),
7805
+ var DomainCommandDefinitionSchema = z10.object({
7806
+ contract: z10.literal("DomainCommandDefinition"),
7586
7807
  commandName: ContractIdentifierSchema,
7587
7808
  ownerRepo: ContractIdentifierSchema,
7588
- displayName: z9.string().trim().min(1),
7589
- description: z9.string().optional(),
7590
- targetKinds: z9.array(ContractIdentifierSchema).min(1),
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: z9.array(ContractIdentifierSchema).default([]),
7814
+ requiredPermissionCodes: z10.array(ContractIdentifierSchema).default([]),
7594
7815
  handlerRef: EntityRefSchema,
7595
- sideEffects: z9.array(z9.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
7816
+ sideEffects: z10.array(z10.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
7596
7817
  }).strict();
7597
- var DomainCommandSchema = z9.object({
7598
- contract: z9.literal("DomainCommand"),
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: z9.object({
7607
- product: z9.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
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 = z9.object({
7615
- contract: z9.literal("ProductDeclaration"),
7835
+ var ProductDeclarationSchema = z10.object({
7836
+ contract: z10.literal("ProductDeclaration"),
7616
7837
  declarationId: ContractIdentifierSchema,
7617
7838
  ownerRepo: ContractIdentifierSchema,
7618
- concepts: z9.array(ConceptDefinitionSchema).default([]),
7619
- ontologies: z9.array(OntologyDefinitionSchema).default([]),
7620
- projections: z9.array(ProjectionSpecSchema).default([]),
7621
- commands: z9.array(DomainCommandDefinitionSchema).default([]),
7622
- capabilities: z9.array(CapabilityManifestSchema).default([]),
7623
- pages: z9.array(PageDefinitionSchema).default([])
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 = z9.object({
7846
+ var DeclarationGraphEdgeSchema = z10.object({
7626
7847
  from: EntityRefSchema,
7627
7848
  to: EntityRefSchema,
7628
- relation: z9.enum([
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 = z9.object({
7857
+ var ChangeImpactSchema = z10.object({
7637
7858
  changedRef: EntityRefSchema,
7638
- affectedRefs: z9.array(EntityRefSchema),
7639
- reasons: z9.array(ContractIdentifierSchema).min(1)
7859
+ affectedRefs: z10.array(EntityRefSchema),
7860
+ reasons: z10.array(ContractIdentifierSchema).min(1)
7640
7861
  }).strict();
7641
- var ChangeImpactGraphSchema = z9.object({
7642
- contract: z9.literal("ChangeImpactGraph"),
7862
+ var ChangeImpactGraphSchema = z10.object({
7863
+ contract: z10.literal("ChangeImpactGraph"),
7643
7864
  declarationId: ContractIdentifierSchema,
7644
- nodes: z9.array(EntityRefSchema),
7645
- edges: z9.array(DeclarationGraphEdgeSchema),
7646
- impacts: z9.array(ChangeImpactSchema),
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 z11 } from "zod";
7872
+ import { z as z12 } from "zod";
7652
7873
 
7653
7874
  // src/contracts/theme.ts
7654
- import { z as z10 } from "zod";
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 = z10.enum(THEME_TOKEN_TYPES);
9849
- var ThemeTokenSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
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 = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
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 = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
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 = z11.object({
9889
- type: z11.literal("file"),
9890
- path: z11.string().trim().min(1).superRefine((source, context) => {
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 = z11.object({
9900
- type: z11.literal("url"),
9901
- url: z11.string().trim().min(1).superRefine((source, context) => {
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 = z11.object({
9911
- type: z11.literal("inline"),
10131
+ var DesignTokenInlineSourceSchema = z12.object({
10132
+ type: z12.literal("inline"),
9912
10133
  document: ThemeTokensSchema
9913
10134
  }).strict();
9914
- var DesignTokenSourceSchema = z11.discriminatedUnion("type", [
10135
+ var DesignTokenSourceSchema = z12.discriminatedUnion("type", [
9915
10136
  DesignTokenFileSourceSchema,
9916
10137
  DesignTokenUrlSourceSchema,
9917
10138
  DesignTokenInlineSourceSchema
9918
10139
  ]);
9919
- var TenantDesignTokensConfigSchema = z11.object({
10140
+ var TenantDesignTokensConfigSchema = z12.object({
9920
10141
  /** Ordered tenant overrides. The backend always applies the product default first. */
9921
- tokenSources: z11.array(DesignTokenSourceSchema)
10142
+ tokenSources: z12.array(DesignTokenSourceSchema)
9922
10143
  }).strict();
9923
- var TenantAuthBindingSchema = z11.object({
9924
- kind: z11.literal("auth-provider"),
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 = z11.discriminatedUnion("kind", [
9929
- z11.object({
9930
- kind: z11.literal("data-provider"),
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
- z11.object({
9935
- kind: z11.literal("projection"),
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 = z11.record(
10161
+ var TenantAuthBindingsSchema = z12.record(
9941
10162
  ContractIdentifierSchema,
9942
10163
  TenantAuthBindingSchema
9943
10164
  );
9944
- var TenantDataBindingsSchema = z11.record(
10165
+ var TenantDataBindingsSchema = z12.record(
9945
10166
  ContractIdentifierSchema,
9946
10167
  TenantDataBindingSchema
9947
10168
  );
9948
- var AssetVariantsSchema = z11.object({
9949
- light: z11.string().optional(),
9950
- dark: z11.string().optional()
10169
+ var AssetVariantsSchema = z12.object({
10170
+ light: z12.string().optional(),
10171
+ dark: z12.string().optional()
9951
10172
  }).strict();
9952
- var ThemeHeadbarSchema = z11.object({
9953
- theme: z11.enum(["card", "glassy", "ghost"]).optional(),
9954
- navPosition: z11.enum(["left", "center", "right"]).optional(),
9955
- actions: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
9956
- profile: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
9957
- showTeamQuota: z11.boolean().optional()
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 = z11.object({
10180
+ var TenantHeadbarModuleLeafSchema = z12.object({
9960
10181
  id: ContractIdentifierSchema,
9961
- extraInfo: z11.boolean().optional(),
9962
- displayName: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
9963
- visible: z11.boolean().optional(),
9964
- disabled: z11.boolean().optional(),
9965
- icon: z11.string().optional(),
9966
- showQuickSwitcher: z11.boolean().optional(),
9967
- showSidebar: z11.boolean().optional()
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: z11.array(TenantHeadbarModuleLeafSchema).optional()
10191
+ children: z12.array(TenantHeadbarModuleLeafSchema).optional()
9971
10192
  }).strict();
9972
- var KernelHeadbarSchema = z11.object({
9973
- theme: z11.literal("card").optional(),
9974
- layoutMode: z11.enum(["boxed", "full-bleed"]).optional(),
9975
- heightPx: z11.number().positive().optional(),
9976
- navPosition: z11.enum(["left", "center", "right"]).optional(),
9977
- brandTitle: z11.string().optional(),
9978
- menuRadius: z11.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
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 = z11.object({
9981
- color: z11.string().optional(),
9982
- url: z11.string().optional(),
9983
- type: z11.enum(["svg", "image"]).optional(),
9984
- hintTextColor: z11.string().optional()
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 = z11.object({
10207
+ var WorkbenchCustomerToolSchema = z12.object({
9987
10208
  id: ContractIdentifierSchema,
9988
- label: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
9989
- fixed: z11.boolean().optional()
10209
+ label: z12.union([z12.string(), z12.record(LocaleIdentifierSchema, z12.string())]).optional(),
10210
+ fixed: z12.boolean().optional()
9990
10211
  }).strict();
9991
- var WorkbenchStudioOverrideSchema = z11.object({
9992
- studioName: z11.string().trim().min(1),
9993
- dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
9994
- existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
9995
- historyColumnsDefault: z11.number().int().min(1).max(6).optional()
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 = z11.object({
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: z11.string().trim().min(1).optional(),
10004
- info: z11.object({
10224
+ iframeUrl: z12.string().trim().min(1).optional(),
10225
+ info: z12.object({
10005
10226
  displayName: LocalizedTextSchema.optional(),
10006
10227
  description: LocalizedTextSchema.optional(),
10007
- iconUrl: z11.string().trim().min(1).optional()
10228
+ iconUrl: z12.string().trim().min(1).optional()
10008
10229
  }).strict().optional(),
10009
- isBuiltinPinned: z11.boolean().optional(),
10010
- isBuiltinReadonly: z11.boolean().optional()
10230
+ isBuiltinPinned: z12.boolean().optional(),
10231
+ isBuiltinReadonly: z12.boolean().optional()
10011
10232
  }).strict();
10012
- var TenantWorkbenchPageEnvelopeSchema = z11.object({
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 = z11.object({
10266
+ var TenantWorkbenchPageGroupSchema = z12.object({
10046
10267
  id: ContractIdentifierSchema,
10047
- pageIds: z11.array(ContractIdentifierSchema),
10268
+ pageIds: z12.array(ContractIdentifierSchema),
10048
10269
  displayName: LocalizedTextSchema,
10049
- isBuiltIn: z11.boolean(),
10050
- iconUrl: z11.string().optional(),
10051
- sortIndex: z11.number().int().nullable().optional(),
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 = z11.object({
10057
- pages: z11.array(TenantWorkbenchPageEnvelopeSchema),
10058
- pageGroups: z11.array(TenantWorkbenchPageGroupSchema),
10059
- catalog: z11.object({ enabled: z11.boolean().optional(), defaultEntry: z11.boolean().optional() }).strict().optional(),
10060
- quickSwitcherMaxItems: z11.number().int().nonnegative().optional(),
10061
- defaultOrder: z11.object({
10062
- groups: z11.array(ContractIdentifierSchema),
10063
- pages: z11.record(ContractIdentifierSchema, z11.array(ContractIdentifierSchema))
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: z11.object({
10066
- dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
10067
- layoutManagerTools: z11.array(WorkbenchCustomerToolSchema).optional(),
10068
- studioTabsMode: z11.enum(["dropdown", "tabs"]).optional(),
10069
- historyWatermark: z11.object({
10070
- svgUrl: z11.string().optional(),
10071
- coverage: z11.array(z11.enum(["list", "detail", "download"])).optional(),
10072
- maxLongEdgeRatio: z11.number().positive().optional(),
10073
- sizing: z11.object({
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: z11.number().positive().optional(),
10076
- minHeightPx: z11.number().nonnegative().optional(),
10077
- maxHeightPx: z11.number().nonnegative().optional()
10296
+ heightRatio: z12.number().positive().optional(),
10297
+ minHeightPx: z12.number().nonnegative().optional(),
10298
+ maxHeightPx: z12.number().nonnegative().optional()
10078
10299
  }).strict().optional(),
10079
- enhance: z11.object({
10080
- enabled: z11.boolean().optional(),
10081
- backgroundLumaThreshold: z11.number().min(0).max(1).optional(),
10082
- stroke: z11.object({
10083
- color: z11.string().optional(),
10084
- opacity: z11.number().min(0).max(1).optional(),
10085
- widthRatio: z11.number().nonnegative().optional(),
10086
- blurRatio: z11.number().nonnegative().optional(),
10087
- steps: z11.number().int().positive().optional()
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: z11.boolean().optional(),
10092
- existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
10093
- historyColumnsDefault: z11.number().int().min(1).max(6).optional(),
10094
- studioOverrides: z11.array(WorkbenchStudioOverrideSchema).optional()
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 = z11.object({
10119
- background: z11.object({ imageUrl: z11.string().optional(), gradient: z11.string().optional() }).strict().optional(),
10120
- logo: z11.object({
10121
- url: z11.string().optional(),
10122
- lightUrl: z11.string().optional(),
10123
- darkUrl: z11.string().optional(),
10124
- position: z11.enum(["top", "middle", "bottom"]).optional(),
10125
- scale: z11.number().positive().optional()
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: z11.string().optional()
10348
+ customCss: z12.string().optional()
10128
10349
  }).strict();
10129
- var LandingPageDefaultConfigSchema = z11.object({
10130
- mode: z11.literal("default")
10350
+ var LandingPageDefaultConfigSchema = z12.object({
10351
+ mode: z12.literal("default")
10131
10352
  }).strict();
10132
- var LandingPageMarkdownConfigSchema = z11.object({
10133
- mode: z11.literal("markdown"),
10134
- content: z11.string()
10353
+ var LandingPageMarkdownConfigSchema = z12.object({
10354
+ mode: z12.literal("markdown"),
10355
+ content: z12.string()
10135
10356
  }).strict();
10136
- var LandingPageHtmlConfigSchema = z11.object({
10137
- mode: z11.literal("html"),
10138
- content: z11.string()
10357
+ var LandingPageHtmlConfigSchema = z12.object({
10358
+ mode: z12.literal("html"),
10359
+ content: z12.string()
10139
10360
  }).strict();
10140
- var LandingPageIframeConfigSchema = z11.object({
10141
- mode: z11.literal("iframe"),
10142
- url: z11.string().refine((value) => {
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 = z11.discriminatedUnion("mode", [
10375
+ var TenantLandingPageConfigSchema = z12.discriminatedUnion("mode", [
10155
10376
  LandingPageDefaultConfigSchema,
10156
10377
  LandingPageMarkdownConfigSchema,
10157
10378
  LandingPageHtmlConfigSchema,
10158
10379
  LandingPageIframeConfigSchema
10159
10380
  ]);
10160
- var TenantApplicationConfigSchema = z11.object({
10161
- theme: z11.object({
10162
- id: z11.string().optional(),
10163
- name: z11.string().optional(),
10164
- title: z11.string().optional(),
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: z11.string().optional(),
10168
- form: z11.object({ variant: z11.enum(["bento", "ghost"]) }).strict().optional(),
10169
- toast: z11.object({
10170
- position: z11.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
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: z11.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
10173
- views: z11.object({
10174
- form: z11.object({
10175
- toast: z11.object({ afterCreate: z11.boolean(), afterDelete: z11.boolean() }).strict(),
10176
- progress: z11.enum(["estimate", "infinite"]),
10177
- onlyResult: z11.boolean(),
10178
- tabular: z11.object({ theme: z11.enum(["default", "tentiary", "primary"]) }).strict()
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: z11.record(z11.string(), z11.string()).optional(),
10183
- hideSpaceHeader: z11.boolean().optional(),
10184
- showSidebarTeamSelector: z11.boolean().optional(),
10185
- showWorkbenchSidebar: z11.boolean().optional(),
10186
- workbenchViewTheme: z11.enum(["default", "bsd-blue"]).optional(),
10187
- defaults: z11.object({
10188
- showFormInImageDetail: z11.boolean().optional(),
10189
- darkMode: z11.enum(["light", "dark", "auto"]).optional(),
10190
- language: z11.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
10191
- showDarkModeToggle: z11.boolean().optional(),
10192
- showLanguageToggle: z11.boolean().optional()
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: z11.object({
10195
- monkeysSpaceSidebar: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
10196
- monkeysSpaceHeadbar: z11.union([
10197
- z11.literal("*"),
10198
- z11.array(TenantHeadbarModuleItemSchema)
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: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional()
10421
+ settingsSidebar: z12.union([z12.literal("*"), z12.array(ContractIdentifierSchema)]).optional()
10201
10422
  }).strict().optional(),
10202
10423
  headbar: ThemeHeadbarSchema.optional(),
10203
- kernelLayout: z11.object({
10204
- navigationMode: z11.enum(["sidebar", "topbar"]).optional(),
10205
- allowNavigationModeSwitch: z11.boolean().optional(),
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: z11.enum(["left", "right"]).optional(),
10209
- ugcViewIconOnlyMode: z11.boolean().optional(),
10210
- workflowPreviewExecutionGrid: z11.object({
10211
- selectionModeDisplayType: z11.enum(["operation-button", "dropdown-menu"]).optional(),
10212
- clickBehavior: z11.enum(["preview", "select", "fill-form", "none"]).optional(),
10213
- showErrorFilter: z11.boolean().optional(),
10214
- displayType: z11.enum(["grid", "masonry"]).optional(),
10215
- showDetailButton: z11.boolean().optional()
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: z11.boolean().optional(),
10218
- workbenchSidebarMoreAction: z11.boolean().optional(),
10219
- workbenchSidebarApart: z11.boolean().optional(),
10220
- workbenchSidebarToggleGroupDetail: z11.boolean().optional(),
10221
- workbenchSidebarViewType: z11.boolean().optional(),
10222
- workbenchSidebarFormViewEmbed: z11.boolean().optional(),
10223
- workbenchSidebarModernMode: z11.boolean().optional(),
10224
- ugc: z11.object({ onItemClick: z11.boolean(), subtitle: z11.boolean().optional() }).strict().optional(),
10225
- uniImagePreview: z11.boolean().optional(),
10226
- imagePreviewStyle: z11.union([z11.literal(false), z11.enum(["simple", "normal", "uni"])]).optional(),
10227
- teamAsUser: z11.boolean().optional(),
10228
- themeMode: z11.enum(["shadow", "border"]).optional(),
10229
- density: z11.enum(["compact", "default", "comfortable"]).optional(),
10230
- pageZoom: z11.number().positive().optional(),
10231
- miniMode: z11.object({ showPreviewViewExecutionResultGrid: z11.boolean() }).strict().optional(),
10232
- workflow: z11.object({ allowConcurrentRuns: z11.boolean() }).strict().optional(),
10233
- historyResult: z11.object({ display: z11.boolean() }).strict().optional(),
10234
- uploader: z11.object({
10235
- orientation: z11.enum(["vertical", "horizontal"]),
10236
- pasteButton: z11.boolean(),
10237
- statusText: z11.boolean()
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: z11.object({
10240
- oneOnOne: z11.boolean(),
10241
- newTabOpenBoard: z11.boolean(),
10242
- defaultShowGrid: z11.boolean().optional(),
10243
- createDefaultFrame: z11.boolean(),
10244
- showPageMenu: z11.boolean(),
10245
- showMainMenu: z11.boolean(),
10246
- showStylePanel: z11.boolean(),
10247
- showToolbar: z11.boolean(),
10248
- toolbarPosition: z11.enum(["bottom", "left"]).optional(),
10249
- showContextMenu: z11.boolean(),
10250
- showActionsMenu: z11.boolean(),
10251
- showPageAndLayerSidebar: z11.boolean().optional(),
10252
- showBoardOperationSidebar: z11.boolean().optional(),
10253
- showMiniToolsToolbar: z11.boolean().optional(),
10254
- showRightSidebar: z11.boolean().optional(),
10255
- showRealtimeDrawing: z11.boolean().optional(),
10256
- showWorkflow: z11.boolean().optional(),
10257
- showVersionManager: z11.boolean().optional(),
10258
- showAgent: z11.boolean().optional(),
10259
- AgentTools: z11.array(ContractIdentifierSchema).optional()
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: z11.array(ContractIdentifierSchema).optional(),
10263
- initTeam: z11.boolean().optional(),
10264
- imageThumbnail: z11.boolean().optional(),
10265
- pages: z11.object({
10266
- allowPageKeys: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
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: z11.object({
10490
+ agent: z12.object({
10270
10491
  logo: AssetVariantsSchema.optional(),
10271
- brandDisplayMode: z11.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
10272
- density: z11.enum(["compact", "default", "comfortable"]).optional()
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: z11.object({
10277
- enabled: z11.array(ContractIdentifierSchema).default([]),
10278
- oidc: z11.object({ buttonText: z11.string().optional(), autoSignin: z11.boolean().optional() }).strict().optional(),
10279
- password: z11.object({ disableAutoRegister: z11.boolean().optional() }).strict().optional(),
10280
- hideAuthToast: z11.boolean().optional(),
10281
- autoReload: z11.boolean().optional(),
10282
- defaultOtherTeam: z11.boolean().optional()
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: z11.record(ContractIdentifierSchema, z11.string()),
10285
- module: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
10286
- behavior: z11.object({
10287
- clearWorkflowFormStorageAfterUpdate: z11.boolean().optional(),
10288
- autoApproveOAuth: z11.boolean().optional(),
10289
- rememberWorkflowModelSelection: z11.boolean().optional()
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: z11.object({
10292
- favoriteBucketId: z11.string().optional(),
10293
- pairedBucketId: z11.string().optional(),
10294
- galleryBucketId: z11.string().optional(),
10295
- dataBrowserDefaultBucketId: z11.string().optional(),
10296
- workflowResultBucketId: z11.string().optional(),
10297
- homeAdvertisement: z11.object({
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: z11.enum(["filter", "container", "share_link"]).optional(),
10521
+ viewType: z12.enum(["filter", "container", "share_link"]).optional(),
10301
10522
  teamId: ContractIdentifierSchema.optional(),
10302
- teamOnly: z11.boolean().optional(),
10303
- pageSize: z11.number().int().positive().optional(),
10304
- sortBy: z11.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
10305
- sortOrder: z11.enum(["asc", "desc"]).optional(),
10306
- fieldMap: z11.record(z11.string(), z11.string()).optional(),
10307
- columnIds: z11.record(z11.string(), z11.string()).optional()
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: z11.object({
10530
+ homeTrendAssistant: z12.object({
10310
10531
  bucketId: ContractIdentifierSchema.optional(),
10311
10532
  viewId: ContractIdentifierSchema.optional(),
10312
10533
  viewInstanceId: ContractIdentifierSchema.optional(),
10313
- viewName: z11.string().optional(),
10534
+ viewName: z12.string().optional(),
10314
10535
  teamId: ContractIdentifierSchema.optional(),
10315
10536
  designOptionsWorkflowId: ContractIdentifierSchema.optional(),
10316
- tep: z11.object({ baseUrl: z11.string().optional(), timeoutMs: z11.number().int().positive().optional() }).strict().optional(),
10317
- runtime: z11.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z11.boolean(), tepAuthorizationConfigured: z11.boolean(), tepCookieConfigured: z11.boolean() }).strict().optional()
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: z11.object({
10320
- silentViewLinks: z11.object({ enabled: z11.boolean().optional(), placement: z11.object({ mode: z11.enum(["sourceBucket", "bucket"]).optional(), bucketId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
10321
- shareAccess: z11.object({ publicLinksEnabled: z11.boolean().optional(), passwordGateEnabled: z11.boolean().optional(), passwordAccessTtlSeconds: z11.number().int().positive().optional(), defaultViewTreeDelivery: z11.enum(["manual", "auto"]).optional() }).strict().optional(),
10322
- shareDialog: z11.object({
10323
- audience: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["user", "team", "public"])).optional(), default: z11.enum(["user", "team", "public"]).optional() }).strict().optional(),
10324
- accessLevel: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["read", "write"])).optional(), default: z11.enum(["read", "write"]).optional() }).strict().optional(),
10325
- viewTreeDelivery: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["manual", "auto"])).optional(), default: z11.enum(["manual", "auto"]).optional() }).strict().optional()
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: z11.object({
10330
- integrations: z11.object({
10331
- harbor: z11.object({ endpoint: z11.string().optional(), projectScopes: z11.array(z11.string()).optional(), authMode: z11.string().optional(), principal: z11.string().optional(), autoSync: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
10332
- gitlab: z11.object({ baseUrl: z11.string().optional(), groupScopes: z11.array(z11.string()).optional(), tokenMode: z11.string().optional(), deployProjectPath: z11.string().optional(), deploymentReportsEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
10333
- kubernetes: z11.object({ accessMode: z11.string().optional(), clusterAlias: z11.string().optional(), agentProjectPath: z11.string().optional(), agentName: z11.string().optional(), namespaceScopes: z11.array(z11.string()).optional(), rolloutObserverEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional()
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: z11.object({}).strict().optional(),
10337
- storage: z11.object({
10338
- presignMode: z11.enum(["frontend", "backend", "both"]).optional(),
10339
- presign: z11.object({
10340
- expiresInSeconds: z11.number().int().positive(),
10341
- buckets: z11.array(
10342
- z11.object({
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: z11.array(
10347
- z11.object({
10567
+ urlPatterns: z12.array(
10568
+ z12.object({
10348
10569
  id: ContractIdentifierSchema,
10349
- type: z11.enum(["bucket-hostname", "provider-hostname"]),
10350
- hostname: z11.string().trim().min(1),
10351
- preferred: z11.boolean().optional(),
10352
- bucketSegment: z11.string().optional()
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: z11.object({ baseUrl: z11.string().optional() }).strict().optional()
10580
+ monkeyData: z12.object({ baseUrl: z12.string().optional() }).strict().optional()
10360
10581
  }).strict();
10361
- var TenantProductConfigSchema = z11.object({
10362
- contract: z11.literal("TenantProductConfig"),
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: z11.array(ContractIdentifierSchema).default([]),
10368
- pageRefs: z11.array(ContractIdentifierSchema).default([]),
10369
- featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
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: z11.record(z11.string(), ContractIdentifierSchema),
10373
- warnings: z11.array(z11.string()).default([]),
10593
+ sourceMap: z12.record(z12.string(), ContractIdentifierSchema),
10594
+ warnings: z12.array(z12.string()).default([]),
10374
10595
  applicationConfig: TenantApplicationConfigSchema
10375
10596
  }).strict();
10376
- var TenantRuntimeConfigSchema = z11.object({
10377
- contract: z11.literal("TenantRuntimeConfig"),
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: z11.array(ContractIdentifierSchema).default([]),
10383
- pageRefs: z11.array(ContractIdentifierSchema).default([]),
10384
- featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
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: z11.record(z11.string(), ContractIdentifierSchema),
10388
- warnings: z11.array(z11.string()).default([]),
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 z12 } from "zod";
10394
- var RadarDecisionMetricsSchema = z12.object({
10395
- currentSales: z12.number().finite(),
10396
- forecastSales: z12.number().finite(),
10397
- searchHeat: z12.number().finite(),
10398
- socialHeat: z12.number().finite(),
10399
- confidence: z12.number().min(0).max(1)
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 = z12.object({
10622
+ var TrendSourceSchema = z13.object({
10402
10623
  sourceId: ContractIdentifierSchema,
10403
10624
  provider: ContractIdentifierSchema,
10404
- channel: z12.enum(["trend", "ecommerce", "social", "search", "internal"]),
10625
+ channel: z13.enum(["trend", "ecommerce", "social", "search", "internal"]),
10405
10626
  collectedAt: IsoDateTimeSchema,
10406
- sourceUrl: z12.string().url().optional(),
10407
- evidenceRefs: z12.array(EntityRefSchema).default([])
10627
+ sourceUrl: z13.string().url().optional(),
10628
+ evidenceRefs: z13.array(EntityRefSchema).default([])
10408
10629
  }).strict();
10409
- var TrendIngestRunSchema = z12.object({
10410
- contract: z12.literal("TrendIngestRun"),
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: z12.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
10416
- recordCount: z12.number().int().nonnegative(),
10417
- errorCount: z12.number().int().nonnegative(),
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 = z12.object({
10422
- contract: z12.literal("TrendSourceRecord"),
10642
+ var TrendSourceRecordSchema = z13.object({
10643
+ contract: z13.literal("TrendSourceRecord"),
10423
10644
  sourceRecordId: ContractIdentifierSchema,
10424
10645
  source: TrendSourceSchema,
10425
10646
  ingestRunRef: EntityRefSchema,
10426
- recordVersion: z12.number().int().positive(),
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 = z12.object({
10433
- contract: z12.literal("HotwordBody"),
10653
+ var HotwordBodySchema = z13.object({
10654
+ contract: z13.literal("HotwordBody"),
10434
10655
  hotwordId: ContractIdentifierSchema,
10435
- label: z12.string().trim().min(1),
10436
- normalizedLabel: z12.string().trim().min(1),
10437
- categories: z12.array(ContractIdentifierSchema).default([]),
10438
- sourceRefs: z12.array(TrendSourceSchema).min(1),
10439
- relationRefs: z12.array(EntityRefSchema).default([]),
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: z12.string().trim().min(1),
10445
- normalizedName: z12.string().trim().min(1),
10446
- categories: z12.array(ContractIdentifierSchema).default([]),
10447
- sourceRefs: z12.array(EntityRefSchema).min(1),
10448
- relationRefs: z12.array(EntityRefSchema).default([]),
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 = z12.object({
10453
- contract: z12.literal("BrandBody"),
10673
+ var BrandBodySchema = z13.object({
10674
+ contract: z13.literal("BrandBody"),
10454
10675
  brandId: ContractIdentifierSchema,
10455
10676
  ...CommerceBodyFieldsSchema
10456
10677
  }).strict();
10457
- var ProductBodySchema = z12.object({
10458
- contract: z12.literal("ProductBody"),
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 = z12.object({
10464
- contract: z12.literal("TrendMetricSnapshot"),
10684
+ var TrendMetricSnapshotSchema = z13.object({
10685
+ contract: z13.literal("TrendMetricSnapshot"),
10465
10686
  snapshotId: ContractIdentifierSchema,
10466
10687
  subjectRef: EntityRefSchema,
10467
10688
  observedAt: IsoDateTimeSchema,
10468
- metrics: z12.record(z12.string(), z12.number().finite()),
10469
- confidence: z12.number().min(0).max(1),
10470
- evidenceRefs: z12.array(EntityRefSchema).min(1)
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 = z12.object({
10473
- contract: z12.literal("RadarScoreModelBody"),
10693
+ var RadarScoreModelBodySchema = z13.object({
10694
+ contract: z13.literal("RadarScoreModelBody"),
10474
10695
  modelId: ContractIdentifierSchema,
10475
- version: z12.number().int().positive(),
10696
+ version: z13.number().int().positive(),
10476
10697
  weights: RadarDecisionMetricsSchema,
10477
- thresholds: z12.record(z12.string(), z12.number().finite()).default({}),
10478
- explanationRules: z12.record(z12.string(), z12.string().trim().min(1)).default({}),
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 = z12.object({
10482
- contract: z12.literal("RadarScoreProjection"),
10702
+ var RadarScoreProjectionSchema = z13.object({
10703
+ contract: z13.literal("RadarScoreProjection"),
10483
10704
  projectionId: ContractIdentifierSchema,
10484
10705
  subjectRef: EntityRefSchema,
10485
10706
  modelRef: EntityRefSchema,
10486
- totalScore: z12.number().finite(),
10707
+ totalScore: z13.number().finite(),
10487
10708
  dimensions: RadarDecisionMetricsSchema,
10488
- evidenceRefs: z12.array(EntityRefSchema).min(1),
10709
+ evidenceRefs: z13.array(EntityRefSchema).min(1),
10489
10710
  freshnessAt: IsoDateTimeSchema
10490
10711
  }).strict();
10491
- var RadarPanoramaNodeSchema = z12.object({
10712
+ var RadarPanoramaNodeSchema = z13.object({
10492
10713
  ref: EntityRefSchema,
10493
- label: z12.string().trim().min(1),
10494
- categories: z12.array(ContractIdentifierSchema).default([]),
10495
- score: z12.number().finite().optional(),
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 = z12.object({
10719
+ var RadarPanoramaEdgeSchema = z13.object({
10499
10720
  sourceRef: EntityRefSchema,
10500
10721
  targetRef: EntityRefSchema,
10501
10722
  relation: ContractIdentifierSchema,
10502
- evidenceRefs: z12.array(EntityRefSchema).default([])
10723
+ evidenceRefs: z13.array(EntityRefSchema).default([])
10503
10724
  }).strict();
10504
- var RadarPanoramaSchema = z12.object({
10505
- contract: z12.literal("RadarPanorama"),
10506
- nodes: z12.array(RadarPanoramaNodeSchema),
10507
- edges: z12.array(RadarPanoramaEdgeSchema),
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 = z12.object({
10511
- contract: z12.literal("BrandGeneticsProfile"),
10731
+ var BrandGeneticsProfileSchema = z13.object({
10732
+ contract: z13.literal("BrandGeneticsProfile"),
10512
10733
  brandRef: EntityRefSchema,
10513
- categories: z12.array(ContractIdentifierSchema).default([]),
10514
- signature: z12.record(ContractIdentifierSchema, z12.number().finite()),
10515
- relatedRefs: z12.array(EntityRefSchema).default([]),
10516
- evidenceRefs: z12.array(EntityRefSchema).default([]),
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 = z12.object({
10740
+ var RadarOpportunityMatrixPointSchema = z13.object({
10520
10741
  subjectRef: EntityRefSchema,
10521
- label: z12.string().trim().min(1),
10522
- x: z12.number().finite(),
10523
- y: z12.number().finite(),
10524
- score: z12.number().finite(),
10525
- evidenceRefs: z12.array(EntityRefSchema).default([])
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 = z12.object({
10528
- contract: z12.literal("RadarOpportunityMatrix"),
10529
- xMetric: z12.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10530
- yMetric: z12.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
10531
- points: z12.array(RadarOpportunityMatrixPointSchema),
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 = z12.object({
10535
- contract: z12.literal("RadarQueryBody"),
10755
+ var RadarQueryBodySchema = z13.object({
10756
+ contract: z13.literal("RadarQueryBody"),
10536
10757
  queryId: ContractIdentifierSchema,
10537
- filters: z12.record(z12.string(), JsonValueSchema).default({}),
10538
- sort: z12.object({
10758
+ filters: z13.record(z13.string(), JsonValueSchema).default({}),
10759
+ sort: z13.object({
10539
10760
  field: ContractIdentifierSchema,
10540
- direction: z12.enum(["asc", "desc"])
10761
+ direction: z13.enum(["asc", "desc"])
10541
10762
  }).strict(),
10542
- pageSize: z12.number().int().min(1).max(200),
10763
+ pageSize: z13.number().int().min(1).max(200),
10543
10764
  updatedAt: IsoDateTimeSchema
10544
10765
  }).strict();
10545
- var SavedRadarQuerySchema = z12.object({
10546
- contract: z12.literal("SavedRadarQuery"),
10766
+ var SavedRadarQuerySchema = z13.object({
10767
+ contract: z13.literal("SavedRadarQuery"),
10547
10768
  savedQueryId: ContractIdentifierSchema,
10548
10769
  teamId: ContractIdentifierSchema,
10549
10770
  ownerRef: EntityRefSchema,
10550
- name: z12.string().trim().min(1),
10771
+ name: z13.string().trim().min(1),
10551
10772
  queryRef: EntityRefSchema,
10552
- expectedVersion: z12.number().int().nonnegative(),
10773
+ expectedVersion: z13.number().int().nonnegative(),
10553
10774
  updatedAt: IsoDateTimeSchema
10554
10775
  }).strict();
10555
- var RadarSelectionSchema = z12.object({
10556
- contract: z12.literal("RadarSelection"),
10776
+ var RadarSelectionSchema = z13.object({
10777
+ contract: z13.literal("RadarSelection"),
10557
10778
  selectionId: ContractIdentifierSchema,
10558
10779
  teamId: ContractIdentifierSchema,
10559
10780
  ownerRef: EntityRefSchema,
10560
- subjectRefs: z12.array(EntityRefSchema),
10561
- status: z12.enum(["stashed", "selected", "rejected", "archived"]),
10562
- note: z12.string().optional(),
10563
- expectedVersion: z12.number().int().nonnegative(),
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 = z12.object({
10567
- contract: z12.literal("RadarAnalysisRun"),
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: z12.record(z12.string(), JsonValueSchema).default({}),
10577
- createDesignProject: z12.boolean().default(true),
10578
- designProjectName: z12.string().trim().min(1).max(200).optional(),
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: z12.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
10583
- outputRefs: z12.array(EntityRefSchema).default([]),
10584
- error: z12.object({
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: z12.string().trim().min(1),
10587
- retryable: z12.boolean()
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 = z12.object({
10814
+ var RadarAnalysisAssetSchema = z13.object({
10594
10815
  artifactRef: EntityRefSchema,
10595
10816
  kind: ContractIdentifierSchema,
10596
- mimeType: z12.string().trim().min(1).optional(),
10597
- url: z12.string().url(),
10598
- metadata: z12.record(z12.string(), JsonValueSchema).default({}),
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 = z12.object({
10602
- contract: z12.literal("RadarAnalysisDetail"),
10822
+ var RadarAnalysisDetailSchema = z13.object({
10823
+ contract: z13.literal("RadarAnalysisDetail"),
10603
10824
  run: RadarAnalysisRunSchema,
10604
- runVersion: z12.number().int().positive(),
10825
+ runVersion: z13.number().int().positive(),
10605
10826
  selection: RadarSelectionSchema,
10606
- outputs: z12.array(OutputRecordSchema),
10607
- assets: z12.array(RadarAnalysisAssetSchema),
10608
- lineage: z12.array(LineageRecordSchema)
10827
+ outputs: z13.array(OutputRecordSchema),
10828
+ assets: z13.array(RadarAnalysisAssetSchema),
10829
+ lineage: z13.array(LineageRecordSchema)
10609
10830
  }).strict();
10610
- var RadarActionRecordSchema = z12.object({
10611
- contract: z12.literal("RadarActionRecord"),
10831
+ var RadarActionRecordSchema = z13.object({
10832
+ contract: z13.literal("RadarActionRecord"),
10612
10833
  actionId: ContractIdentifierSchema,
10613
10834
  teamId: ContractIdentifierSchema,
10614
10835
  actorRef: EntityRefSchema,
10615
- action: z12.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
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: z12.number().int().nonnegative(),
10840
+ expectedVersion: z13.number().int().nonnegative(),
10620
10841
  occurredAt: IsoDateTimeSchema
10621
10842
  }).strict();
10622
- var RadarWritebackRecordSchema = z12.object({
10623
- contract: z12.literal("RadarWritebackRecord"),
10843
+ var RadarWritebackRecordSchema = z13.object({
10844
+ contract: z13.literal("RadarWritebackRecord"),
10624
10845
  writebackId: ContractIdentifierSchema,
10625
10846
  actionRef: EntityRefSchema,
10626
10847
  targetRef: EntityRefSchema,
10627
- status: z12.enum(["PENDING", "APPLIED", "FAILED"]),
10628
- resultingVersion: z12.number().int().nonnegative().optional(),
10629
- error: z12.string().trim().min(1).optional(),
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 z13 } from "zod";
10635
- var ConductorTaskTypeSchema = z13.enum([
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 = z13.lazy(
10685
- () => z13.object({
10905
+ var ConductorTaskDefinitionSchema = z14.lazy(
10906
+ () => z14.object({
10686
10907
  name: ContractIdentifierSchema,
10687
10908
  taskReferenceName: ContractIdentifierSchema,
10688
10909
  type: ConductorTaskTypeSchema,
10689
- inputParameters: z13.record(z13.string(), JsonValueSchema).optional(),
10690
- startDelay: z13.number().int().nonnegative().optional(),
10691
- optional: z13.boolean().optional(),
10692
- asyncComplete: z13.boolean().optional(),
10693
- rateLimited: z13.boolean().optional(),
10694
- retryCount: z13.number().int().nonnegative().optional(),
10695
- taskDefinition: z13.record(z13.string(), JsonValueSchema).optional(),
10696
- loopCondition: z13.string().optional(),
10697
- loopOver: z13.array(ConductorTaskDefinitionSchema).optional(),
10698
- sink: z13.string().optional(),
10699
- forkTasks: z13.array(z13.array(ConductorTaskDefinitionSchema)).optional(),
10700
- joinOn: z13.array(ContractIdentifierSchema).optional(),
10701
- defaultExclusiveJoinTask: z13.array(ContractIdentifierSchema).optional(),
10702
- dynamicForkTasksParam: z13.string().optional(),
10703
- dynamicForkTasksInputParamName: z13.string().optional(),
10704
- subWorkflowParam: z13.object({
10705
- $ref: z13.string().optional(),
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: z13.number().int().positive().optional(),
10708
- taskToDomain: z13.record(z13.string(), z13.string()).optional(),
10709
- workflowDefinition: z13.record(z13.string(), JsonValueSchema).optional()
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: z13.record(z13.string(), z13.array(ConductorTaskDefinitionSchema)).optional(),
10712
- defaultCase: z13.array(ConductorTaskDefinitionSchema).optional(),
10713
- evaluatorType: z13.enum(["value-param", "javascript", "graaljs"]).optional(),
10714
- expression: z13.string().optional(),
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: z13.boolean().optional(),
10937
+ callbackFromWorker: z14.boolean().optional(),
10717
10938
  caseExpression: JsonValueSchema.optional(),
10718
- caseValueParam: z13.string().optional(),
10719
- dependencies: z13.array(JsonValueSchema).optional(),
10720
- description: z13.string().optional(),
10721
- dynamicTaskNameParam: z13.string().optional(),
10722
- joinMode: z13.string().optional(),
10723
- permissive: z13.boolean().optional(),
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 = z13.object({
10738
- ownerApp: z13.string().optional(),
10739
- createTime: z13.number().int().nonnegative().optional(),
10740
- updateTime: z13.number().int().nonnegative().optional(),
10741
- createdBy: z13.string().optional(),
10742
- updatedBy: z13.string().optional(),
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: z13.string().optional(),
10745
- version: z13.number().int().positive(),
10746
- tasks: z13.array(ConductorTaskDefinitionSchema),
10747
- inputParameters: z13.array(ContractIdentifierSchema),
10748
- outputParameters: z13.record(z13.string(), JsonValueSchema).optional(),
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: z13.number().int().positive().optional(),
10751
- restartable: z13.boolean().optional(),
10752
- workflowStatusListenerEnabled: z13.boolean().optional(),
10753
- ownerEmail: z13.string().email().optional(),
10754
- timeoutPolicy: z13.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
10755
- timeoutSeconds: z13.number().int().nonnegative(),
10756
- variables: z13.record(z13.string(), JsonValueSchema).optional(),
10757
- inputTemplate: z13.record(z13.string(), JsonValueSchema).optional()
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 = z13.enum([
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 = z13.object({
10770
- conditions: z13.array(
10771
- z13.object({
10772
- field: z13.string(),
10773
- operator: z13.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
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: z13.enum(["AND", "OR"]).optional()
10998
+ logic: z14.enum(["AND", "OR"]).optional()
10778
10999
  }).strict();
10779
- var ImageSelectMappingAppearanceSchema = z13.object({
10780
- columns: z13.number().int().min(1).max(4).optional(),
10781
- cardSize: z13.enum(["sm", "md", "lg"]).optional(),
10782
- imageAspectRatio: z13.enum(["square", "4:5", "3:4", "16:9"]).optional(),
10783
- gap: z13.enum(["sm", "md", "lg"]).optional(),
10784
- radius: z13.enum(["sm", "md", "lg", "xl"]).optional(),
10785
- borderStyle: z13.enum(["none", "soft", "strong"]).optional(),
10786
- borderWidth: z13.union([z13.literal(0), z13.literal(1), z13.literal(2)]).optional(),
10787
- enableScroll: z13.boolean().optional(),
10788
- maxHeight: z13.number().int().min(160).max(1200).optional(),
10789
- enableCollapse: z13.boolean().optional(),
10790
- visibleRows: z13.number().int().min(1).max(6).optional(),
10791
- hideLabel: z13.boolean().optional(),
10792
- hideDescription: z13.boolean().optional(),
10793
- hideValue: z13.boolean().optional()
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 = z13.object({
10796
- node: z13.union([z13.string(), z13.number()]),
10797
- key: z13.string().optional()
11016
+ var ComfyWorkflowPortBindingSchema = z14.object({
11017
+ node: z14.union([z14.string(), z14.number()]),
11018
+ key: z14.string().optional()
10798
11019
  }).strict();
10799
- var WorkflowParameterTypeOptionsSchema = z13.object({
10800
- editor: z13.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
10801
- editorLanguage: z13.enum(["javaScript", "json", "python", "sql"]).optional(),
10802
- maxValue: z13.number().optional(),
10803
- minValue: z13.number().optional(),
10804
- max: z13.number().optional(),
10805
- min: z13.number().optional(),
10806
- multipleValues: z13.boolean().optional(),
10807
- numberPrecision: z13.number().nonnegative().optional(),
10808
- password: z13.boolean().optional(),
10809
- rows: z13.number().int().positive().optional(),
10810
- assetType: z13.string().optional(),
10811
- accept: z13.string().optional(),
10812
- maxSize: z13.number().positive().optional(),
10813
- fileType: z13.string().optional(),
10814
- aiMultiShotMainImageField: z13.string().optional(),
10815
- aiMultiShotWorkflowAppId: z13.string().optional(),
10816
- aiMultiShotWorkflowId: z13.string().optional(),
10817
- allowCustomInput: z13.boolean().optional(),
10818
- allowUploadVideo: z13.boolean().optional(),
10819
- aspectRatioField: z13.string().optional(),
10820
- assemblyValueType: z13.string().optional(),
10821
- autoAnalyzeDesignImage: z13.boolean().optional(),
10822
- autoDetectAspectRatio: z13.boolean().optional(),
10823
- autoIncrementId: z13.boolean().optional(),
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: z13.string().optional(),
10826
- comfyuiModelTypeName: z13.string().optional(),
11046
+ comfyuiModelServerId: z14.string().optional(),
11047
+ comfyuiModelTypeName: z14.string().optional(),
10827
11048
  defaultCustomInput: JsonValueSchema.optional(),
10828
- descriptionAlert: z13.boolean().optional(),
10829
- disabled: z13.union([z13.boolean(), WorkflowConditionalStateSchema]).optional(),
10830
- editable: z13.union([z13.boolean(), WorkflowConditionalStateSchema]).optional(),
10831
- enableAiMultiShot: z13.boolean().optional(),
10832
- enableBooleanSwitchMode: z13.boolean().optional(),
10833
- enableClear: z13.boolean().optional(),
10834
- enableExpand: z13.boolean().optional(),
10835
- enableImageMask: z13.boolean().optional(),
10836
- enableImageOverlay: z13.boolean().optional(),
10837
- enablePopupEditor: z13.boolean().optional(),
10838
- enablePromptFontSize: z13.boolean().optional(),
10839
- enableReset: z13.boolean().optional(),
10840
- enableSelectItemIcon: z13.boolean().optional(),
10841
- enableSelectList: z13.boolean().optional(),
10842
- enableSelectSearch: z13.boolean().optional(),
10843
- enableSliderEnterMode: z13.boolean().optional(),
10844
- enableVoice: z13.boolean().optional(),
10845
- expandButtonText: z13.string().optional(),
10846
- foldUp: z13.boolean().optional(),
10847
- hidden: z13.boolean().optional(),
10848
- hideRequiredDot: z13.boolean().optional(),
10849
- inlineTitleWithSelect: z13.boolean().optional(),
10850
- knowledgeGraphButtonText: z13.string().optional(),
10851
- identifyAttributeCount: z13.union([z13.number().nonnegative(), z13.string().min(1), z13.object({ min: z13.number().nonnegative().optional(), max: z13.number().nonnegative().optional() }).strict()]).optional(),
10852
- identifyAttributes: z13.array(JsonValueSchema).optional(),
10853
- identifyMaxVariants: z13.number().int().nonnegative().optional(),
10854
- identifySourceField: z13.string().optional(),
10855
- imageOverlayBaseField: z13.string().optional(),
10856
- imageOverlayOverlayField: z13.string().optional(),
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: z13.number().int().min(1).max(4).optional(),
10859
- imageSelectMappingEnableCustomUpload: z13.boolean().optional(),
10860
- imageSelectMappingHideLabel: z13.boolean().optional(),
10861
- imageSelectMappingHideLink: z13.boolean().optional(),
10862
- imageSelectMappingHideMeta: z13.boolean().optional(),
10863
- imageSelectMappingInlineUseLargeUploadBox: z13.boolean().optional(),
10864
- imageSelectMappingPromptField: z13.string().optional(),
10865
- imageSelectMappingTabOrder: z13.enum(["template-first", "upload-first"]).optional(),
10866
- imageSelectMappingTabWidthMode: z13.enum(["content", "fill"]).optional(),
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: z13.enum(["tabs", "inline"]).optional(),
11090
+ imageSelectMappingUploadMode: z14.enum(["tabs", "inline"]).optional(),
10870
11091
  imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
10871
11092
  imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
10872
- endpoints: z13.array(JsonValueSchema).optional(),
10873
- examples: z13.array(JsonValueSchema).optional(),
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: z13.boolean().optional(),
10878
- options: z13.array(JsonValueSchema).optional(),
10879
- originalFiles: z13.array(JsonValueSchema).optional(),
11098
+ multiline: z14.boolean().optional(),
11099
+ options: z14.array(JsonValueSchema).optional(),
11100
+ originalFiles: z14.array(JsonValueSchema).optional(),
10880
11101
  placeholder: LocalizedTextSchema.optional(),
10881
- preserveSelectListOrder: z13.boolean().optional(),
11102
+ preserveSelectListOrder: z14.boolean().optional(),
10882
11103
  promptDictionary: JsonValueSchema.optional(),
10883
- promptFontSize: z13.number().optional(),
11104
+ promptFontSize: z14.number().optional(),
10884
11105
  promptModeToggle: JsonValueSchema.optional(),
10885
- requireActiveSelectFilter: z13.boolean().optional(),
10886
- restoreDefaultOnEmptyEnter: z13.boolean().optional(),
10887
- search: z13.boolean().optional(),
10888
- selectButtonEnableCollapse: z13.boolean().optional(),
10889
- selectButtonVisibleRows: z13.number().int().positive().optional(),
10890
- selectList: z13.array(JsonValueSchema).optional(),
10891
- selectListDisplayMode: z13.string().optional(),
10892
- selectPromptField: z13.string().optional(),
10893
- showAddLocalFileButton: z13.boolean().optional(),
10894
- singleColumn: z13.boolean().optional(),
10895
- singleFrameForMultiple: z13.boolean().optional(),
10896
- textSingleLine: z13.boolean().optional(),
10897
- textareaMiniHeight: z13.number().nonnegative().optional(),
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: z13.string().optional(),
10901
- designAnalysisFields: z13.array(JsonValueSchema).optional(),
10902
- designAnalysisFillStrategy: z13.string().optional(),
10903
- designAnalysisMaxFields: z13.number().int().nonnegative().optional(),
10904
- designAnalysisType: z13.string().optional(),
10905
- designAnalysisFieldPrefix: z13.string().optional()
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 = z13.lazy(
10908
- () => z13.object({
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: z13.string().optional(),
10916
- displayOptions: z13.object({
10917
- hide: z13.record(z13.string(), z13.array(JsonValueSchema)).optional(),
10918
- show: z13.record(z13.string(), z13.array(JsonValueSchema)).optional()
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: z13.array(z13.union([
10921
- z13.object({ name: LocalizedTextSchema, value: z13.union([z13.string(), z13.number(), z13.boolean()]), action: z13.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
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
- z13.object({ displayName: z13.string(), name: ContractIdentifierSchema, values: z13.array(WorkflowParameterSchema) }).strict()
11144
+ z14.object({ displayName: z14.string(), name: ContractIdentifierSchema, values: z14.array(WorkflowParameterSchema) }).strict()
10924
11145
  ])).optional(),
10925
11146
  placeholder: LocalizedTextSchema.optional(),
10926
- isNodeSetting: z13.boolean().optional(),
10927
- noDataExpression: z13.boolean().optional(),
10928
- required: z13.boolean().optional(),
10929
- example: z13.string().optional(),
10930
- extractValue: z13.object({ type: z13.literal("regex"), regex: z13.string() }).strict().optional(),
10931
- properties: z13.array(WorkflowParameterSchema).optional(),
10932
- assetType: z13.string().optional(),
10933
- flag: z13.boolean().optional(),
10934
- enableExpand: z13.boolean().optional(),
10935
- enableVoice: z13.boolean().optional(),
10936
- expandButtonText: z13.string().optional(),
10937
- knowledgeGraphButtonText: z13.string().optional(),
10938
- selectListDisplayMode: z13.string().optional(),
10939
- voiceButtonText: z13.string().optional()
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 = z13.object({ key: ContractIdentifierSchema, value: z13.string() }).strict();
10943
- var WorkflowNodeSchema = z13.object({
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: z13.record(z13.string(), JsonValueSchema).default({}),
10949
- configuration: z13.object({ executor: z13.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
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 = z13.object({
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: z13.string().optional()
11181
+ condition: z14.string().optional()
10961
11182
  }).strict();
10962
- var WorkflowTriggerSchema = z13.object({
11183
+ var WorkflowTriggerSchema = z14.object({
10963
11184
  id: ContractIdentifierSchema,
10964
- type: z13.enum(["manual", "schedule", "webhook", "event", "api"]),
10965
- enabled: z13.boolean(),
10966
- schedule: z13.object({ cron: z13.string().trim().min(1) }).strict().optional(),
10967
- webhook: z13.object({
10968
- path: z13.string().trim().min(1).optional(),
10969
- method: z13.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
10970
- auth: z13.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
10971
- basicAuth: z13.object({ username: z13.string(), password: z13.string() }).strict().optional(),
10972
- headerAuth: z13.object({ name: z13.string().trim().min(1), value: z13.string() }).strict().optional(),
10973
- responseUntil: z13.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
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: z13.object({
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 = z13.object({
11205
+ var WorkflowValidationIssueSchema = z14.object({
10985
11206
  taskReferenceName: ContractIdentifierSchema,
10986
- issueType: z13.enum(["ERROR", "WARNING"]),
10987
- detailReason: z13.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
10988
- humanMessage: z13.object({ en: z13.string(), zh: z13.string() }).strict()
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 = z13.object({
10991
- contract: z13.literal("WorkflowDefinition"),
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: z13.enum(["workflow", "template"]),
11216
+ role: z14.enum(["workflow", "template"]),
10996
11217
  teamId: ContractIdentifierSchema,
10997
11218
  creatorRef: EntityRefSchema,
10998
- tags: z13.array(ContractIdentifierSchema).default([])
11219
+ tags: z14.array(ContractIdentifierSchema).default([])
10999
11220
  }).strict(),
11000
- revision: z13.object({
11001
- kind: z13.enum(["release", "backup"]),
11002
- recordVersion: z13.number().int().positive(),
11003
- sourceVersion: z13.number().int().positive().optional()
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: z13.object({ iconUrl: z13.string().optional(), thumbnail: z13.string().optional() }).strict(),
11008
- ports: z13.object({ inputs: z13.array(ContractPortSchema).default([]), outputs: z13.array(ContractPortSchema).default([]) }).strict(),
11009
- parameters: z13.object({ variables: z13.array(WorkflowParameterSchema).default([]), outputs: z13.array(WorkflowOutputBindingSchema).default([]) }).strict(),
11010
- graph: z13.object({ nodes: z13.array(WorkflowNodeSchema), edges: z13.array(WorkflowEdgeSchema).default([]) }).strict(),
11011
- execution: z13.object({
11012
- timeoutMs: z13.number().int().positive().optional(),
11013
- retries: z13.number().int().nonnegative().default(0),
11014
- concurrencyLimit: z13.number().int().positive().optional(),
11015
- idempotency: z13.enum(["required", "supported", "none"]),
11016
- rateLimit: z13.object({ enabled: z13.boolean(), max: z13.number().int().nonnegative(), windowMs: z13.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
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: z13.object({
11020
- ownerApp: z13.string().optional(),
11021
- createTime: z13.number().int().nonnegative().optional(),
11022
- updateTime: z13.number().int().nonnegative().optional(),
11023
- createdBy: z13.string().optional(),
11024
- updatedBy: z13.string().optional(),
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: z13.number().int().positive().optional(),
11027
- restartable: z13.boolean().optional(),
11028
- workflowStatusListenerEnabled: z13.boolean().optional(),
11029
- ownerEmail: z13.string().email().optional(),
11030
- timeoutPolicy: z13.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
11031
- variables: z13.record(z13.string(), JsonValueSchema).optional(),
11032
- inputTemplate: z13.record(z13.string(), JsonValueSchema).optional()
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: z13.array(WorkflowTriggerSchema).default([]),
11036
- views: z13.array(z13.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
11037
- dataContracts: z13.object({ reads: z13.array(ContractIdentifierSchema).default([]), writes: z13.array(ContractIdentifierSchema).default([]), emits: z13.array(ContractIdentifierSchema).default([]) }).strict(),
11038
- governance: z13.object({ activated: z13.boolean(), validated: z13.boolean(), validationIssues: z13.array(WorkflowValidationIssueSchema).default([]), hidden: z13.boolean().optional() }).strict(),
11039
- interfaces: z13.object({
11040
- openai: z13.object({ enabled: z13.boolean(), modelName: z13.string().trim().min(1).optional() }).strict(),
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,