Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
Merge remote-tracking branch 'origin/main' into next/issue-2091
Adam Eivyb1404ca65f34
diff --cc server/lib/postValidation.jsindex de45e27a4a,fde8417b2b..d3ffe11a49--- a/server/lib/postValidation.js+++ b/server/lib/postValidation.js@@@ -373,24 -373,23 +373,41 @@@ export const morseLevelUpdateSchema = z}).optional(),});+// =============================================================================+// PROGRESS DASHBOARD QUERY (issue #2091)+// =============================================================================++// GET /post/progress query params. `days` clamps like /post/stats: a NaN /+// missing value falls back to the 90-day default, a value >365 is clamped, and+// <=0 means all-time (0). `bucket` is forward-compat (only day buckets today).+export const postProgressQuerySchema = z.object({+ days: z.preprocess((v) => {+ if (v == null || v === '') return 90;+ const n = parseInt(v, 10);+ if (Number.isNaN(n)) return 90;+ if (n <= 0) return 0;+ return Math.min(n, 365);+ }, z.number().int()),+ bucket: z.enum(['day']).optional().default('day'),+});++ // Per-question breakdown for a training-log entry (issue #2114 — follow-up to+ // #2097, which only persisted round-level aggregates). Optional and additive:+ // entries without it (legacy rows, and non-wordplay training modules that+ // never populate it) must stay valid. Field names mirror llmResponseSchema+ // above (the shape scored POST sessions store per LLM-drill question) so a+ // future progress dashboard can render training-log and scored-session+ // breakdowns with the same renderer rather than inventing a training-only shape.+ const trainingQuestionSchema = z.object({+ prompt: z.string().optional(),+ response: z.string().optional(),+ items: z.array(z.string()).optional(),+ responseMs: z.number().min(0).optional(),+ score: z.number().min(0).max(100).optional(),+ feedback: z.string().optional(),+ correct: z.boolean().optional(),+ });+// Training log entry submissionexport const trainingEntrySchema = z.object({module: z.string(),