From c183fae6f9827e20e1a5e09ea38bc91b3f0b5a76 Mon Sep 17 00:00:00 2001 From: kingwl Date: Mon, 3 Aug 2026 12:04:44 +0800 Subject: [PATCH] clarify timing projection schema cast --- packages/subagent/subagent/src/projection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/subagent/subagent/src/projection.ts b/packages/subagent/subagent/src/projection.ts index 171ea18eef..ffdcb4fd09 100644 --- a/packages/subagent/subagent/src/projection.ts +++ b/packages/subagent/subagent/src/projection.ts @@ -19,8 +19,8 @@ interface TimingState { descriptorSeen: boolean } -// Cast for the optional values: under exactOptionalPropertyTypes zod infers -// `number | undefined` where the interface declares absent-or-number fields. +// Zod's optional output includes explicit `undefined`; with +// exactOptionalPropertyTypes the public interface permits omission only. const projectionSchema = z.object({ settledMs: z.number().int().nonnegative(), active: z.object({