Generalize Persona replay fixtures

This commit is contained in:
Meta Vens 2026-06-06 00:18:46 +01:00
commit 3785318772
13 changed files with 387 additions and 5 deletions

View file

@ -418,6 +418,8 @@ const faceStressResponseSchema = z.object({
affectiveSignature: z.string().trim().min(1).max(2000),
constraintLoss: z.string().trim().min(1).max(2000),
behavioralLeak: z.string().trim().min(1).max(2000),
tangentAttractors: z.array(z.string().trim().min(1).max(1000)).default([]),
cadence: z.string().trim().min(1).max(1000).optional(),
recoveryPath: z.string().trim().min(1).max(2000),
intensity: z.number().min(0).max(1).default(0.5),
threshold: z.number().min(0).max(1).default(0.7),

View file

@ -371,8 +371,10 @@ function renderPersonaAffectSummary(
` Affective signature: ${response.affectiveSignature}`,
` Constraint loss: ${response.constraintLoss}`,
` Behavioral leak: ${response.behavioralLeak}`,
response.tangentAttractors.length > 0 ? ` Tangent attractors: ${response.tangentAttractors.join(" | ")}` : "",
response.cadence ? ` Cadence: ${response.cadence}` : "",
` Recovery path: ${response.recoveryPath}`,
].join("\n"),
].filter(Boolean).join("\n"),
),
]
.filter((line): line is string => typeof line === "string")