fix: bound conversational nested JSON arrays
This commit is contained in:
@@ -66,8 +66,8 @@ const candidateSchema = boundedJson(z.object({
|
||||
|
||||
const technicalReceiptSchema = boundedJson(z.object({
|
||||
calculationVersion: boundedNonblankText(80),
|
||||
stableLayers: z.array(boundedNonblankText(80)).max(20),
|
||||
sensitiveLayers: z.array(boundedNonblankText(80)).max(20),
|
||||
stableLayers: boundedJson(z.array(boundedNonblankText(80)).max(20), 4_096),
|
||||
sensitiveLayers: boundedJson(z.array(boundedNonblankText(80)).max(20), 4_096),
|
||||
candidateDifferenceRefs: z.array(boundedNonblankText(120)).max(40),
|
||||
}).strict(), 8_192);
|
||||
|
||||
|
||||
@@ -152,10 +152,10 @@ export const privateCandidateSchema = boundedJson(z.object({
|
||||
rangeEnd: timeSchema.nullable().optional(),
|
||||
calculationVersion: boundedText(80),
|
||||
candidateWeights: z.array(z.number().finite().min(0).max(1)).max(1_440).optional(),
|
||||
candidateModelRefs: z.array(boundedText(120)).max(80).optional(),
|
||||
candidateModelRefs: boundedJson(z.array(boundedText(120)).max(80), 16_384).optional(),
|
||||
d1Stability: z.enum(["stable", "sensitive", "unavailable"]).optional(),
|
||||
boundaryDistanceMinutes: z.number().int().min(0).max(1_440).nullable().optional(),
|
||||
supportedSensitiveLayers: z.array(boundedText(80)).max(40).optional(),
|
||||
supportedSensitiveLayers: boundedJson(z.array(boundedText(80)).max(40), 8_192).optional(),
|
||||
scoredHistoricalEvidence: z.array(scoredEvidenceSchema).max(100).optional(),
|
||||
suggestedDomains: z.array(evidenceDomainSchema).max(6).optional(),
|
||||
futureWindows: z.array(futureWindowSchema).max(20).optional(),
|
||||
|
||||
Reference in New Issue
Block a user