@otto-code/protocol 0.9.6 → 0.9.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -494,6 +494,14 @@ export declare const BrowserAutomationTabInfoSchema: z.ZodObject<{
494
494
  ready: "ready";
495
495
  detached: "detached";
496
496
  }>>;
497
+ viewportMode: z.ZodOptional<z.ZodEnum<{
498
+ responsive: "responsive";
499
+ fixed: "fixed";
500
+ }>>;
501
+ viewportWidth: z.ZodOptional<z.ZodNumber>;
502
+ viewportHeight: z.ZodOptional<z.ZodNumber>;
503
+ paneWidth: z.ZodOptional<z.ZodNumber>;
504
+ paneHeight: z.ZodOptional<z.ZodNumber>;
497
505
  }, z.core.$strip>;
498
506
  export declare const BrowserAutomationListTabsResultSchema: z.ZodObject<{
499
507
  command: z.ZodLiteral<"list_tabs">;
@@ -511,6 +519,14 @@ export declare const BrowserAutomationListTabsResultSchema: z.ZodObject<{
511
519
  ready: "ready";
512
520
  detached: "detached";
513
521
  }>>;
522
+ viewportMode: z.ZodOptional<z.ZodEnum<{
523
+ responsive: "responsive";
524
+ fixed: "fixed";
525
+ }>>;
526
+ viewportWidth: z.ZodOptional<z.ZodNumber>;
527
+ viewportHeight: z.ZodOptional<z.ZodNumber>;
528
+ paneWidth: z.ZodOptional<z.ZodNumber>;
529
+ paneHeight: z.ZodOptional<z.ZodNumber>;
514
530
  }, z.core.$strip>>;
515
531
  }, z.core.$strip>;
516
532
  export declare const BrowserAutomationNewTabResultSchema: z.ZodObject<{
@@ -798,6 +814,14 @@ export declare const BrowserAutomationResultSchema: z.ZodDiscriminatedUnion<[z.Z
798
814
  ready: "ready";
799
815
  detached: "detached";
800
816
  }>>;
817
+ viewportMode: z.ZodOptional<z.ZodEnum<{
818
+ responsive: "responsive";
819
+ fixed: "fixed";
820
+ }>>;
821
+ viewportWidth: z.ZodOptional<z.ZodNumber>;
822
+ viewportHeight: z.ZodOptional<z.ZodNumber>;
823
+ paneWidth: z.ZodOptional<z.ZodNumber>;
824
+ paneHeight: z.ZodOptional<z.ZodNumber>;
801
825
  }, z.core.$strip>>;
802
826
  }, z.core.$strip>, z.ZodObject<{
803
827
  command: z.ZodLiteral<"new_tab">;
@@ -1270,6 +1294,14 @@ export declare const BrowserAutomationExecuteResponseSchema: z.ZodObject<{
1270
1294
  ready: "ready";
1271
1295
  detached: "detached";
1272
1296
  }>>;
1297
+ viewportMode: z.ZodOptional<z.ZodEnum<{
1298
+ responsive: "responsive";
1299
+ fixed: "fixed";
1300
+ }>>;
1301
+ viewportWidth: z.ZodOptional<z.ZodNumber>;
1302
+ viewportHeight: z.ZodOptional<z.ZodNumber>;
1303
+ paneWidth: z.ZodOptional<z.ZodNumber>;
1304
+ paneHeight: z.ZodOptional<z.ZodNumber>;
1273
1305
  }, z.core.$strip>>;
1274
1306
  }, z.core.$strip>, z.ZodObject<{
1275
1307
  command: z.ZodLiteral<"new_tab">;
@@ -316,6 +316,20 @@ export const BrowserAutomationTabInfoSchema = z.object({
316
316
  // COMPAT(browserTabStatus): added in v0.7.5; absent ⇒ "ready", which is how
317
317
  // every pre-0.7.5 host behaved. Drop the gate when floor >= v0.7.5.
318
318
  status: z.enum(["starting", "ready", "detached"]).optional(),
319
+ // Geometry of the presented tab, in CSS pixels. `viewport*` is the size the
320
+ // page lays out and screenshots at; `pane*` is the region the user's browser
321
+ // pane gives it. They diverge whenever a fixed device size is selected (by
322
+ // the pane's device picker or by browser_resize): the frame is cropped to the
323
+ // pane, never scaled to fit, so a caller that cannot see both numbers cannot
324
+ // tell that the user is looking at a slice of the page.
325
+ // COMPAT(browserTabGeometry): added in v0.9.8; absent ⇒ the tab has never
326
+ // been presented, or the host predates the field. Drop the gate when floor
327
+ // >= v0.9.8.
328
+ viewportMode: z.enum(["responsive", "fixed"]).optional(),
329
+ viewportWidth: z.number().int().positive().optional(),
330
+ viewportHeight: z.number().int().positive().optional(),
331
+ paneWidth: z.number().int().positive().optional(),
332
+ paneHeight: z.number().int().positive().optional(),
319
333
  });
320
334
  export const BrowserAutomationListTabsResultSchema = z.object({
321
335
  command: z.literal("list_tabs"),