@layernorm/overlay-agent-bridge-protocol 0.8.0 → 0.10.0

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.
@@ -0,0 +1,631 @@
1
+ import { z } from 'zod/v3';
2
+ /**
3
+ * `chrome_browser`: the person's own Chrome, through the Overlay Chrome extension (internal/develop/chrome-extension.md).
4
+ * The server checks a call against these schemas before sending it and the extension checks it again before acting,
5
+ * so the extension never depends on the server for what an action may be.
6
+ */
7
+ export declare const BROWSER_TOOLS_VERSION: 1;
8
+ export declare const browserToolsCapabilitySchema: z.ZodObject<{
9
+ version: z.ZodLiteral<1>;
10
+ browser: z.ZodLiteral<"chrome">;
11
+ os: z.ZodString;
12
+ }, "strict", z.ZodTypeAny, {
13
+ version: 1;
14
+ browser: "chrome";
15
+ os: string;
16
+ }, {
17
+ version: 1;
18
+ browser: "chrome";
19
+ os: string;
20
+ }>;
21
+ export type BrowserToolsCapability = z.infer<typeof browserToolsCapabilitySchema>;
22
+ /** A browser has no folders, so its approval grants none. Never valid for a machine. */
23
+ export declare const browserFilesystemGrantSchema: z.ZodObject<{
24
+ mode: z.ZodLiteral<"none">;
25
+ }, "strict", z.ZodTypeAny, {
26
+ mode: "none";
27
+ }, {
28
+ mode: "none";
29
+ }>;
30
+ /** What a browser advertises. Unlike a machine it has no local tools and no file system. */
31
+ export declare const browserCapabilitiesSchema: z.ZodObject<{
32
+ protocolVersion: z.ZodLiteral<1>;
33
+ browserTools: z.ZodObject<{
34
+ version: z.ZodLiteral<1>;
35
+ browser: z.ZodLiteral<"chrome">;
36
+ os: z.ZodString;
37
+ }, "strict", z.ZodTypeAny, {
38
+ version: 1;
39
+ browser: "chrome";
40
+ os: string;
41
+ }, {
42
+ version: 1;
43
+ browser: "chrome";
44
+ os: string;
45
+ }>;
46
+ hostVersion: z.ZodString;
47
+ platform: z.ZodString;
48
+ }, "strict", z.ZodTypeAny, {
49
+ protocolVersion: 1;
50
+ browserTools: {
51
+ version: 1;
52
+ browser: "chrome";
53
+ os: string;
54
+ };
55
+ hostVersion: string;
56
+ platform: string;
57
+ }, {
58
+ protocolVersion: 1;
59
+ browserTools: {
60
+ version: 1;
61
+ browser: "chrome";
62
+ os: string;
63
+ };
64
+ hostVersion: string;
65
+ platform: string;
66
+ }>;
67
+ export type BrowserCapabilities = z.infer<typeof browserCapabilitiesSchema>;
68
+ export declare const chromeBrowserVariants: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
69
+ action: z.ZodLiteral<"tabs">;
70
+ }, "strict", z.ZodTypeAny, {
71
+ action: "tabs";
72
+ }, {
73
+ action: "tabs";
74
+ }>, z.ZodObject<{
75
+ action: z.ZodLiteral<"new_tab">;
76
+ url: z.ZodEffects<z.ZodString, string, string>;
77
+ }, "strict", z.ZodTypeAny, {
78
+ action: "new_tab";
79
+ url: string;
80
+ }, {
81
+ action: "new_tab";
82
+ url: string;
83
+ }>, z.ZodObject<{
84
+ action: z.ZodLiteral<"switch_tab">;
85
+ tabId: z.ZodNumber;
86
+ }, "strict", z.ZodTypeAny, {
87
+ action: "switch_tab";
88
+ tabId: number;
89
+ }, {
90
+ action: "switch_tab";
91
+ tabId: number;
92
+ }>, z.ZodObject<{
93
+ action: z.ZodLiteral<"close_tab">;
94
+ tabId: z.ZodNumber;
95
+ }, "strict", z.ZodTypeAny, {
96
+ action: "close_tab";
97
+ tabId: number;
98
+ }, {
99
+ action: "close_tab";
100
+ tabId: number;
101
+ }>, z.ZodObject<{
102
+ tabId: z.ZodOptional<z.ZodNumber>;
103
+ action: z.ZodLiteral<"navigate">;
104
+ url: z.ZodEffects<z.ZodString, string, string>;
105
+ }, "strict", z.ZodTypeAny, {
106
+ action: "navigate";
107
+ url: string;
108
+ tabId?: number | undefined;
109
+ }, {
110
+ action: "navigate";
111
+ url: string;
112
+ tabId?: number | undefined;
113
+ }>, z.ZodObject<{
114
+ tabId: z.ZodOptional<z.ZodNumber>;
115
+ action: z.ZodLiteral<"back">;
116
+ }, "strict", z.ZodTypeAny, {
117
+ action: "back";
118
+ tabId?: number | undefined;
119
+ }, {
120
+ action: "back";
121
+ tabId?: number | undefined;
122
+ }>, z.ZodObject<{
123
+ tabId: z.ZodOptional<z.ZodNumber>;
124
+ action: z.ZodLiteral<"forward">;
125
+ }, "strict", z.ZodTypeAny, {
126
+ action: "forward";
127
+ tabId?: number | undefined;
128
+ }, {
129
+ action: "forward";
130
+ tabId?: number | undefined;
131
+ }>, z.ZodObject<{
132
+ tabId: z.ZodOptional<z.ZodNumber>;
133
+ action: z.ZodLiteral<"reload">;
134
+ }, "strict", z.ZodTypeAny, {
135
+ action: "reload";
136
+ tabId?: number | undefined;
137
+ }, {
138
+ action: "reload";
139
+ tabId?: number | undefined;
140
+ }>, z.ZodObject<{
141
+ tabId: z.ZodOptional<z.ZodNumber>;
142
+ action: z.ZodLiteral<"snapshot">;
143
+ }, "strict", z.ZodTypeAny, {
144
+ action: "snapshot";
145
+ tabId?: number | undefined;
146
+ }, {
147
+ action: "snapshot";
148
+ tabId?: number | undefined;
149
+ }>, z.ZodObject<{
150
+ tabId: z.ZodOptional<z.ZodNumber>;
151
+ action: z.ZodLiteral<"read_text">;
152
+ }, "strict", z.ZodTypeAny, {
153
+ action: "read_text";
154
+ tabId?: number | undefined;
155
+ }, {
156
+ action: "read_text";
157
+ tabId?: number | undefined;
158
+ }>, z.ZodObject<{
159
+ tabId: z.ZodOptional<z.ZodNumber>;
160
+ action: z.ZodLiteral<"click">;
161
+ ref: z.ZodString;
162
+ confirm: z.ZodOptional<z.ZodBoolean>;
163
+ }, "strict", z.ZodTypeAny, {
164
+ action: "click";
165
+ ref: string;
166
+ confirm?: boolean | undefined;
167
+ tabId?: number | undefined;
168
+ }, {
169
+ action: "click";
170
+ ref: string;
171
+ confirm?: boolean | undefined;
172
+ tabId?: number | undefined;
173
+ }>, z.ZodObject<{
174
+ tabId: z.ZodOptional<z.ZodNumber>;
175
+ action: z.ZodLiteral<"type">;
176
+ ref: z.ZodString;
177
+ text: z.ZodString;
178
+ submit: z.ZodOptional<z.ZodBoolean>;
179
+ }, "strict", z.ZodTypeAny, {
180
+ action: "type";
181
+ text: string;
182
+ ref: string;
183
+ submit?: boolean | undefined;
184
+ tabId?: number | undefined;
185
+ }, {
186
+ action: "type";
187
+ text: string;
188
+ ref: string;
189
+ submit?: boolean | undefined;
190
+ tabId?: number | undefined;
191
+ }>, z.ZodObject<{
192
+ tabId: z.ZodOptional<z.ZodNumber>;
193
+ action: z.ZodLiteral<"select">;
194
+ ref: z.ZodString;
195
+ value: z.ZodString;
196
+ }, "strict", z.ZodTypeAny, {
197
+ value: string;
198
+ action: "select";
199
+ ref: string;
200
+ tabId?: number | undefined;
201
+ }, {
202
+ value: string;
203
+ action: "select";
204
+ ref: string;
205
+ tabId?: number | undefined;
206
+ }>, z.ZodObject<{
207
+ tabId: z.ZodOptional<z.ZodNumber>;
208
+ action: z.ZodLiteral<"press">;
209
+ keys: z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>;
210
+ ref: z.ZodOptional<z.ZodString>;
211
+ }, "strict", z.ZodTypeAny, {
212
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
213
+ action: "press";
214
+ ref?: string | undefined;
215
+ tabId?: number | undefined;
216
+ }, {
217
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
218
+ action: "press";
219
+ ref?: string | undefined;
220
+ tabId?: number | undefined;
221
+ }>, z.ZodObject<{
222
+ tabId: z.ZodOptional<z.ZodNumber>;
223
+ action: z.ZodLiteral<"hover">;
224
+ ref: z.ZodString;
225
+ }, "strict", z.ZodTypeAny, {
226
+ action: "hover";
227
+ ref: string;
228
+ tabId?: number | undefined;
229
+ }, {
230
+ action: "hover";
231
+ ref: string;
232
+ tabId?: number | undefined;
233
+ }>, z.ZodObject<{
234
+ tabId: z.ZodOptional<z.ZodNumber>;
235
+ action: z.ZodLiteral<"scroll">;
236
+ direction: z.ZodEnum<["up", "down", "left", "right"]>;
237
+ amount: z.ZodNumber;
238
+ }, "strict", z.ZodTypeAny, {
239
+ action: "scroll";
240
+ direction: "up" | "down" | "left" | "right";
241
+ amount: number;
242
+ tabId?: number | undefined;
243
+ }, {
244
+ action: "scroll";
245
+ direction: "up" | "down" | "left" | "right";
246
+ amount: number;
247
+ tabId?: number | undefined;
248
+ }>, z.ZodObject<{
249
+ tabId: z.ZodOptional<z.ZodNumber>;
250
+ action: z.ZodLiteral<"wait_for">;
251
+ text: z.ZodString;
252
+ ms: z.ZodOptional<z.ZodNumber>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ action: "wait_for";
255
+ text: string;
256
+ ms?: number | undefined;
257
+ tabId?: number | undefined;
258
+ }, {
259
+ action: "wait_for";
260
+ text: string;
261
+ ms?: number | undefined;
262
+ tabId?: number | undefined;
263
+ }>]>;
264
+ export type ChromeBrowserAction = z.infer<typeof chromeBrowserVariants>;
265
+ /** One flat object for the model; `chromeBrowserVariants` checks each action. */
266
+ export declare const chromeBrowserFields: {
267
+ action: z.ZodEnum<["tabs", "new_tab", "switch_tab", "close_tab", "navigate", "back", "forward", "reload", "snapshot", "read_text", "click", "type", "select", "press", "hover", "scroll", "wait_for"]>;
268
+ tabId: z.ZodOptional<z.ZodNumber>;
269
+ url: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
270
+ ref: z.ZodOptional<z.ZodString>;
271
+ confirm: z.ZodOptional<z.ZodBoolean>;
272
+ text: z.ZodOptional<z.ZodString>;
273
+ submit: z.ZodOptional<z.ZodBoolean>;
274
+ value: z.ZodOptional<z.ZodString>;
275
+ keys: z.ZodOptional<z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>>;
276
+ direction: z.ZodOptional<z.ZodEnum<["up", "down", "left", "right"]>>;
277
+ amount: z.ZodOptional<z.ZodNumber>;
278
+ ms: z.ZodOptional<z.ZodNumber>;
279
+ };
280
+ /** One call to a browser: what to do, and who is asking, which the extension shows the person. */
281
+ export declare const browserToolRequestSchema: z.ZodObject<{
282
+ kind: z.ZodLiteral<"browser">;
283
+ input: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
284
+ action: z.ZodLiteral<"tabs">;
285
+ }, "strict", z.ZodTypeAny, {
286
+ action: "tabs";
287
+ }, {
288
+ action: "tabs";
289
+ }>, z.ZodObject<{
290
+ action: z.ZodLiteral<"new_tab">;
291
+ url: z.ZodEffects<z.ZodString, string, string>;
292
+ }, "strict", z.ZodTypeAny, {
293
+ action: "new_tab";
294
+ url: string;
295
+ }, {
296
+ action: "new_tab";
297
+ url: string;
298
+ }>, z.ZodObject<{
299
+ action: z.ZodLiteral<"switch_tab">;
300
+ tabId: z.ZodNumber;
301
+ }, "strict", z.ZodTypeAny, {
302
+ action: "switch_tab";
303
+ tabId: number;
304
+ }, {
305
+ action: "switch_tab";
306
+ tabId: number;
307
+ }>, z.ZodObject<{
308
+ action: z.ZodLiteral<"close_tab">;
309
+ tabId: z.ZodNumber;
310
+ }, "strict", z.ZodTypeAny, {
311
+ action: "close_tab";
312
+ tabId: number;
313
+ }, {
314
+ action: "close_tab";
315
+ tabId: number;
316
+ }>, z.ZodObject<{
317
+ tabId: z.ZodOptional<z.ZodNumber>;
318
+ action: z.ZodLiteral<"navigate">;
319
+ url: z.ZodEffects<z.ZodString, string, string>;
320
+ }, "strict", z.ZodTypeAny, {
321
+ action: "navigate";
322
+ url: string;
323
+ tabId?: number | undefined;
324
+ }, {
325
+ action: "navigate";
326
+ url: string;
327
+ tabId?: number | undefined;
328
+ }>, z.ZodObject<{
329
+ tabId: z.ZodOptional<z.ZodNumber>;
330
+ action: z.ZodLiteral<"back">;
331
+ }, "strict", z.ZodTypeAny, {
332
+ action: "back";
333
+ tabId?: number | undefined;
334
+ }, {
335
+ action: "back";
336
+ tabId?: number | undefined;
337
+ }>, z.ZodObject<{
338
+ tabId: z.ZodOptional<z.ZodNumber>;
339
+ action: z.ZodLiteral<"forward">;
340
+ }, "strict", z.ZodTypeAny, {
341
+ action: "forward";
342
+ tabId?: number | undefined;
343
+ }, {
344
+ action: "forward";
345
+ tabId?: number | undefined;
346
+ }>, z.ZodObject<{
347
+ tabId: z.ZodOptional<z.ZodNumber>;
348
+ action: z.ZodLiteral<"reload">;
349
+ }, "strict", z.ZodTypeAny, {
350
+ action: "reload";
351
+ tabId?: number | undefined;
352
+ }, {
353
+ action: "reload";
354
+ tabId?: number | undefined;
355
+ }>, z.ZodObject<{
356
+ tabId: z.ZodOptional<z.ZodNumber>;
357
+ action: z.ZodLiteral<"snapshot">;
358
+ }, "strict", z.ZodTypeAny, {
359
+ action: "snapshot";
360
+ tabId?: number | undefined;
361
+ }, {
362
+ action: "snapshot";
363
+ tabId?: number | undefined;
364
+ }>, z.ZodObject<{
365
+ tabId: z.ZodOptional<z.ZodNumber>;
366
+ action: z.ZodLiteral<"read_text">;
367
+ }, "strict", z.ZodTypeAny, {
368
+ action: "read_text";
369
+ tabId?: number | undefined;
370
+ }, {
371
+ action: "read_text";
372
+ tabId?: number | undefined;
373
+ }>, z.ZodObject<{
374
+ tabId: z.ZodOptional<z.ZodNumber>;
375
+ action: z.ZodLiteral<"click">;
376
+ ref: z.ZodString;
377
+ confirm: z.ZodOptional<z.ZodBoolean>;
378
+ }, "strict", z.ZodTypeAny, {
379
+ action: "click";
380
+ ref: string;
381
+ confirm?: boolean | undefined;
382
+ tabId?: number | undefined;
383
+ }, {
384
+ action: "click";
385
+ ref: string;
386
+ confirm?: boolean | undefined;
387
+ tabId?: number | undefined;
388
+ }>, z.ZodObject<{
389
+ tabId: z.ZodOptional<z.ZodNumber>;
390
+ action: z.ZodLiteral<"type">;
391
+ ref: z.ZodString;
392
+ text: z.ZodString;
393
+ submit: z.ZodOptional<z.ZodBoolean>;
394
+ }, "strict", z.ZodTypeAny, {
395
+ action: "type";
396
+ text: string;
397
+ ref: string;
398
+ submit?: boolean | undefined;
399
+ tabId?: number | undefined;
400
+ }, {
401
+ action: "type";
402
+ text: string;
403
+ ref: string;
404
+ submit?: boolean | undefined;
405
+ tabId?: number | undefined;
406
+ }>, z.ZodObject<{
407
+ tabId: z.ZodOptional<z.ZodNumber>;
408
+ action: z.ZodLiteral<"select">;
409
+ ref: z.ZodString;
410
+ value: z.ZodString;
411
+ }, "strict", z.ZodTypeAny, {
412
+ value: string;
413
+ action: "select";
414
+ ref: string;
415
+ tabId?: number | undefined;
416
+ }, {
417
+ value: string;
418
+ action: "select";
419
+ ref: string;
420
+ tabId?: number | undefined;
421
+ }>, z.ZodObject<{
422
+ tabId: z.ZodOptional<z.ZodNumber>;
423
+ action: z.ZodLiteral<"press">;
424
+ keys: z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>;
425
+ ref: z.ZodOptional<z.ZodString>;
426
+ }, "strict", z.ZodTypeAny, {
427
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
428
+ action: "press";
429
+ ref?: string | undefined;
430
+ tabId?: number | undefined;
431
+ }, {
432
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
433
+ action: "press";
434
+ ref?: string | undefined;
435
+ tabId?: number | undefined;
436
+ }>, z.ZodObject<{
437
+ tabId: z.ZodOptional<z.ZodNumber>;
438
+ action: z.ZodLiteral<"hover">;
439
+ ref: z.ZodString;
440
+ }, "strict", z.ZodTypeAny, {
441
+ action: "hover";
442
+ ref: string;
443
+ tabId?: number | undefined;
444
+ }, {
445
+ action: "hover";
446
+ ref: string;
447
+ tabId?: number | undefined;
448
+ }>, z.ZodObject<{
449
+ tabId: z.ZodOptional<z.ZodNumber>;
450
+ action: z.ZodLiteral<"scroll">;
451
+ direction: z.ZodEnum<["up", "down", "left", "right"]>;
452
+ amount: z.ZodNumber;
453
+ }, "strict", z.ZodTypeAny, {
454
+ action: "scroll";
455
+ direction: "up" | "down" | "left" | "right";
456
+ amount: number;
457
+ tabId?: number | undefined;
458
+ }, {
459
+ action: "scroll";
460
+ direction: "up" | "down" | "left" | "right";
461
+ amount: number;
462
+ tabId?: number | undefined;
463
+ }>, z.ZodObject<{
464
+ tabId: z.ZodOptional<z.ZodNumber>;
465
+ action: z.ZodLiteral<"wait_for">;
466
+ text: z.ZodString;
467
+ ms: z.ZodOptional<z.ZodNumber>;
468
+ }, "strict", z.ZodTypeAny, {
469
+ action: "wait_for";
470
+ text: string;
471
+ ms?: number | undefined;
472
+ tabId?: number | undefined;
473
+ }, {
474
+ action: "wait_for";
475
+ text: string;
476
+ ms?: number | undefined;
477
+ tabId?: number | undefined;
478
+ }>]>;
479
+ agentName: z.ZodString;
480
+ /** The run this call belongs to. Stop refuses the rest of it. */
481
+ runId: z.ZodString;
482
+ /** The conversation, which owns the agent's tabs, so a later message can keep using them. */
483
+ sessionId: z.ZodString;
484
+ }, "strict", z.ZodTypeAny, {
485
+ kind: "browser";
486
+ input: {
487
+ action: "tabs";
488
+ } | {
489
+ action: "new_tab";
490
+ url: string;
491
+ } | {
492
+ action: "switch_tab";
493
+ tabId: number;
494
+ } | {
495
+ action: "close_tab";
496
+ tabId: number;
497
+ } | {
498
+ action: "navigate";
499
+ url: string;
500
+ tabId?: number | undefined;
501
+ } | {
502
+ action: "back";
503
+ tabId?: number | undefined;
504
+ } | {
505
+ action: "forward";
506
+ tabId?: number | undefined;
507
+ } | {
508
+ action: "reload";
509
+ tabId?: number | undefined;
510
+ } | {
511
+ action: "snapshot";
512
+ tabId?: number | undefined;
513
+ } | {
514
+ action: "read_text";
515
+ tabId?: number | undefined;
516
+ } | {
517
+ action: "click";
518
+ ref: string;
519
+ confirm?: boolean | undefined;
520
+ tabId?: number | undefined;
521
+ } | {
522
+ action: "type";
523
+ text: string;
524
+ ref: string;
525
+ submit?: boolean | undefined;
526
+ tabId?: number | undefined;
527
+ } | {
528
+ value: string;
529
+ action: "select";
530
+ ref: string;
531
+ tabId?: number | undefined;
532
+ } | {
533
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
534
+ action: "press";
535
+ ref?: string | undefined;
536
+ tabId?: number | undefined;
537
+ } | {
538
+ action: "hover";
539
+ ref: string;
540
+ tabId?: number | undefined;
541
+ } | {
542
+ action: "scroll";
543
+ direction: "up" | "down" | "left" | "right";
544
+ amount: number;
545
+ tabId?: number | undefined;
546
+ } | {
547
+ action: "wait_for";
548
+ text: string;
549
+ ms?: number | undefined;
550
+ tabId?: number | undefined;
551
+ };
552
+ agentName: string;
553
+ runId: string;
554
+ sessionId: string;
555
+ }, {
556
+ kind: "browser";
557
+ input: {
558
+ action: "tabs";
559
+ } | {
560
+ action: "new_tab";
561
+ url: string;
562
+ } | {
563
+ action: "switch_tab";
564
+ tabId: number;
565
+ } | {
566
+ action: "close_tab";
567
+ tabId: number;
568
+ } | {
569
+ action: "navigate";
570
+ url: string;
571
+ tabId?: number | undefined;
572
+ } | {
573
+ action: "back";
574
+ tabId?: number | undefined;
575
+ } | {
576
+ action: "forward";
577
+ tabId?: number | undefined;
578
+ } | {
579
+ action: "reload";
580
+ tabId?: number | undefined;
581
+ } | {
582
+ action: "snapshot";
583
+ tabId?: number | undefined;
584
+ } | {
585
+ action: "read_text";
586
+ tabId?: number | undefined;
587
+ } | {
588
+ action: "click";
589
+ ref: string;
590
+ confirm?: boolean | undefined;
591
+ tabId?: number | undefined;
592
+ } | {
593
+ action: "type";
594
+ text: string;
595
+ ref: string;
596
+ submit?: boolean | undefined;
597
+ tabId?: number | undefined;
598
+ } | {
599
+ value: string;
600
+ action: "select";
601
+ ref: string;
602
+ tabId?: number | undefined;
603
+ } | {
604
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
605
+ action: "press";
606
+ ref?: string | undefined;
607
+ tabId?: number | undefined;
608
+ } | {
609
+ action: "hover";
610
+ ref: string;
611
+ tabId?: number | undefined;
612
+ } | {
613
+ action: "scroll";
614
+ direction: "up" | "down" | "left" | "right";
615
+ amount: number;
616
+ tabId?: number | undefined;
617
+ } | {
618
+ action: "wait_for";
619
+ text: string;
620
+ ms?: number | undefined;
621
+ tabId?: number | undefined;
622
+ };
623
+ agentName: string;
624
+ runId: string;
625
+ sessionId: string;
626
+ }>;
627
+ export type BrowserToolRequest = z.infer<typeof browserToolRequestSchema>;
628
+ export declare function chromeBrowserErrorText(code: string, message: string): string;
629
+ /** The text the model reads for a result. Page content is marked as data, since any site can write it. */
630
+ export declare function chromeBrowserText(input: ChromeBrowserAction, result: Record<string, unknown>): string;
631
+ //# sourceMappingURL=browser-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-tools.d.ts","sourceRoot":"","sources":["../src/browser-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAG1B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAG,CAAU,CAAA;AAE/C,eAAO,MAAM,4BAA4B;;;;;;;;;;;;EAI9B,CAAA;AACX,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEjF,wFAAwF;AACxF,eAAO,MAAM,4BAA4B;;;;;;EAAiD,CAAA;AAE1F,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3B,CAAA;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAO3E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBhC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEvE,iFAAiF;AACjF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;CAgB/B,CAAA;AAED,kGAAkG;AAClG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAInC,iEAAiE;;IAEjE,6FAA6F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEpF,CAAA;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAOzE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAE5E;AAED,0GAA0G;AAC1G,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAwBrG"}