From e7c4936bc7f99c1bd52f4818e2ec304ae3a0113e Mon Sep 17 00:00:00 2001 From: Sheing Date: Sat, 17 Jan 2026 18:41:55 -0600 Subject: [PATCH] fix(cli): allow null path in screenshot command validation (#101) The Rust CLI sends `null` for the `path` argument when it is not provided, but the Zod schema only accepted `undefined`. This change updates the `screenshotSchema` to allow `null` values for `path`, enabling the `screenshot` command to work without a file path argument (outputting to stdout). Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com> --- src/protocol.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.ts b/src/protocol.ts index bf4bb2d..dc3de79 100644 --- a/src/protocol.ts +++ b/src/protocol.ts @@ -670,7 +670,7 @@ const pressSchema = baseCommandSchema.extend({ const screenshotSchema = baseCommandSchema.extend({ action: z.literal('screenshot'), - path: z.string().optional(), + path: z.string().nullable().optional(), fullPage: z.boolean().optional(), selector: z.string().min(1).optional(), format: z.enum(['png', 'jpeg']).optional(),