@layernorm/overlay-agent-bridge-protocol 0.7.0 → 0.9.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.
@@ -10,28 +10,32 @@ export declare const MAX_LOCAL_TOOL_CALLS_PER_POLL = 10;
10
10
  export declare const MAX_LOCAL_TOOL_RESULT_BYTES: number;
11
11
  export declare const MAX_LOCAL_TOOL_REQUEST_BYTES: number;
12
12
  export declare const LOCAL_TOOL_POLL_WAIT_MAX_MS = 20000;
13
- export declare const LOCAL_TOOL_FEATURES: readonly ["exec", "files", "terminal", "screenshot", "input", "browser"];
13
+ /**
14
+ * A server rejects a host that advertises a feature it doesn't know, so a new name must reach production web before
15
+ * any released host sends it, and must stay accepted afterwards.
16
+ */
17
+ export declare const LOCAL_TOOL_FEATURES: readonly ["exec", "files", "terminal", "screenshot", "input", "browser", "file_replace", "terminal_input"];
14
18
  export type LocalToolFeature = (typeof LOCAL_TOOL_FEATURES)[number];
15
19
  export declare const localToolsCapabilitySchema: z.ZodObject<{
16
20
  version: z.ZodLiteral<1>;
17
21
  os: z.ZodEnum<["darwin", "linux", "win32"]>;
18
- features: z.ZodArray<z.ZodEnum<["exec", "files", "terminal", "screenshot", "input", "browser"]>, "many">;
22
+ features: z.ZodArray<z.ZodEnum<["exec", "files", "terminal", "screenshot", "input", "browser", "file_replace", "terminal_input"]>, "many">;
19
23
  /** Real home directory, so the model can resolve `~` and default listings. */
20
24
  homeDirectory: z.ZodString;
21
25
  }, "strict", z.ZodTypeAny, {
22
26
  version: 1;
23
27
  os: "darwin" | "linux" | "win32";
24
- features: ("exec" | "files" | "terminal" | "screenshot" | "input" | "browser")[];
28
+ features: ("browser" | "input" | "exec" | "files" | "terminal" | "screenshot" | "file_replace" | "terminal_input")[];
25
29
  homeDirectory: string;
26
30
  }, {
27
31
  version: 1;
28
32
  os: "darwin" | "linux" | "win32";
29
- features: ("exec" | "files" | "terminal" | "screenshot" | "input" | "browser")[];
33
+ features: ("browser" | "input" | "exec" | "files" | "terminal" | "screenshot" | "file_replace" | "terminal_input")[];
30
34
  homeDirectory: string;
31
35
  }>;
32
36
  export type LocalToolsCapability = z.infer<typeof localToolsCapabilitySchema>;
33
37
  /** The driver commands mirror the cloud Computer driver so the same tools work on both targets. */
34
- export declare const LOCAL_DRIVER_COMMANDS: readonly ["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_cancel", "terminal_list"];
38
+ export declare const LOCAL_DRIVER_COMMANDS: readonly ["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_write", "terminal_cancel", "terminal_list"];
35
39
  export type LocalDriverCommand = (typeof LOCAL_DRIVER_COMMANDS)[number];
36
40
  export declare const localToolRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
37
41
  kind: z.ZodLiteral<"exec">;
@@ -39,13 +43,13 @@ export declare const localToolRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.
39
43
  cwd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
40
44
  timeoutMs: z.ZodNumber;
41
45
  }, "strict", z.ZodTypeAny, {
42
- kind: "exec";
43
46
  command: string;
47
+ kind: "exec";
44
48
  timeoutMs: number;
45
49
  cwd?: string | undefined;
46
50
  }, {
47
- kind: "exec";
48
51
  command: string;
52
+ kind: "exec";
49
53
  timeoutMs: number;
50
54
  cwd?: string | undefined;
51
55
  }>, z.ZodObject<{
@@ -54,12 +58,12 @@ export declare const localToolRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.
54
58
  maxBytes: z.ZodNumber;
55
59
  }, "strict", z.ZodTypeAny, {
56
60
  path: string;
57
- kind: "read_file";
58
61
  maxBytes: number;
62
+ kind: "read_file";
59
63
  }, {
60
64
  path: string;
61
- kind: "read_file";
62
65
  maxBytes: number;
66
+ kind: "read_file";
63
67
  }>, z.ZodObject<{
64
68
  kind: z.ZodLiteral<"write_file">;
65
69
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -72,6 +76,21 @@ export declare const localToolRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.
72
76
  path: string;
73
77
  kind: "write_file";
74
78
  contentsBase64: string;
79
+ }>, z.ZodObject<{
80
+ kind: z.ZodLiteral<"replace_file">;
81
+ path: z.ZodEffects<z.ZodString, string, string>;
82
+ contentsBase64: z.ZodString;
83
+ expectedRevision: z.ZodString;
84
+ }, "strict", z.ZodTypeAny, {
85
+ path: string;
86
+ kind: "replace_file";
87
+ contentsBase64: string;
88
+ expectedRevision: string;
89
+ }, {
90
+ path: string;
91
+ kind: "replace_file";
92
+ contentsBase64: string;
93
+ expectedRevision: string;
75
94
  }>, z.ZodObject<{
76
95
  kind: z.ZodLiteral<"list_files">;
77
96
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -83,16 +102,359 @@ export declare const localToolRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.
83
102
  kind: "list_files";
84
103
  }>, z.ZodObject<{
85
104
  kind: z.ZodLiteral<"driver">;
86
- command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_cancel", "terminal_list"]>;
105
+ command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_write", "terminal_cancel", "terminal_list"]>;
87
106
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
88
107
  }, "strict", z.ZodTypeAny, {
89
- kind: "driver";
90
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
108
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
91
109
  args: Record<string, unknown>;
92
- }, {
93
110
  kind: "driver";
94
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
111
+ }, {
112
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
95
113
  args: Record<string, unknown>;
114
+ kind: "driver";
115
+ }>, z.ZodObject<{
116
+ kind: z.ZodLiteral<"browser">;
117
+ input: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
118
+ action: z.ZodLiteral<"tabs">;
119
+ }, "strict", z.ZodTypeAny, {
120
+ action: "tabs";
121
+ }, {
122
+ action: "tabs";
123
+ }>, z.ZodObject<{
124
+ action: z.ZodLiteral<"new_tab">;
125
+ url: z.ZodEffects<z.ZodString, string, string>;
126
+ }, "strict", z.ZodTypeAny, {
127
+ action: "new_tab";
128
+ url: string;
129
+ }, {
130
+ action: "new_tab";
131
+ url: string;
132
+ }>, z.ZodObject<{
133
+ action: z.ZodLiteral<"switch_tab">;
134
+ tabId: z.ZodNumber;
135
+ }, "strict", z.ZodTypeAny, {
136
+ action: "switch_tab";
137
+ tabId: number;
138
+ }, {
139
+ action: "switch_tab";
140
+ tabId: number;
141
+ }>, z.ZodObject<{
142
+ action: z.ZodLiteral<"close_tab">;
143
+ tabId: z.ZodNumber;
144
+ }, "strict", z.ZodTypeAny, {
145
+ action: "close_tab";
146
+ tabId: number;
147
+ }, {
148
+ action: "close_tab";
149
+ tabId: number;
150
+ }>, z.ZodObject<{
151
+ tabId: z.ZodOptional<z.ZodNumber>;
152
+ action: z.ZodLiteral<"navigate">;
153
+ url: z.ZodEffects<z.ZodString, string, string>;
154
+ }, "strict", z.ZodTypeAny, {
155
+ action: "navigate";
156
+ url: string;
157
+ tabId?: number | undefined;
158
+ }, {
159
+ action: "navigate";
160
+ url: string;
161
+ tabId?: number | undefined;
162
+ }>, z.ZodObject<{
163
+ tabId: z.ZodOptional<z.ZodNumber>;
164
+ action: z.ZodLiteral<"back">;
165
+ }, "strict", z.ZodTypeAny, {
166
+ action: "back";
167
+ tabId?: number | undefined;
168
+ }, {
169
+ action: "back";
170
+ tabId?: number | undefined;
171
+ }>, z.ZodObject<{
172
+ tabId: z.ZodOptional<z.ZodNumber>;
173
+ action: z.ZodLiteral<"forward">;
174
+ }, "strict", z.ZodTypeAny, {
175
+ action: "forward";
176
+ tabId?: number | undefined;
177
+ }, {
178
+ action: "forward";
179
+ tabId?: number | undefined;
180
+ }>, z.ZodObject<{
181
+ tabId: z.ZodOptional<z.ZodNumber>;
182
+ action: z.ZodLiteral<"reload">;
183
+ }, "strict", z.ZodTypeAny, {
184
+ action: "reload";
185
+ tabId?: number | undefined;
186
+ }, {
187
+ action: "reload";
188
+ tabId?: number | undefined;
189
+ }>, z.ZodObject<{
190
+ tabId: z.ZodOptional<z.ZodNumber>;
191
+ action: z.ZodLiteral<"snapshot">;
192
+ }, "strict", z.ZodTypeAny, {
193
+ action: "snapshot";
194
+ tabId?: number | undefined;
195
+ }, {
196
+ action: "snapshot";
197
+ tabId?: number | undefined;
198
+ }>, z.ZodObject<{
199
+ tabId: z.ZodOptional<z.ZodNumber>;
200
+ action: z.ZodLiteral<"read_text">;
201
+ }, "strict", z.ZodTypeAny, {
202
+ action: "read_text";
203
+ tabId?: number | undefined;
204
+ }, {
205
+ action: "read_text";
206
+ tabId?: number | undefined;
207
+ }>, z.ZodObject<{
208
+ tabId: z.ZodOptional<z.ZodNumber>;
209
+ action: z.ZodLiteral<"click">;
210
+ ref: z.ZodString;
211
+ confirm: z.ZodOptional<z.ZodBoolean>;
212
+ }, "strict", z.ZodTypeAny, {
213
+ action: "click";
214
+ ref: string;
215
+ confirm?: boolean | undefined;
216
+ tabId?: number | undefined;
217
+ }, {
218
+ action: "click";
219
+ ref: string;
220
+ confirm?: boolean | undefined;
221
+ tabId?: number | undefined;
222
+ }>, z.ZodObject<{
223
+ tabId: z.ZodOptional<z.ZodNumber>;
224
+ action: z.ZodLiteral<"type">;
225
+ ref: z.ZodString;
226
+ text: z.ZodString;
227
+ submit: z.ZodOptional<z.ZodBoolean>;
228
+ }, "strict", z.ZodTypeAny, {
229
+ action: "type";
230
+ text: string;
231
+ ref: string;
232
+ submit?: boolean | undefined;
233
+ tabId?: number | undefined;
234
+ }, {
235
+ action: "type";
236
+ text: string;
237
+ ref: string;
238
+ submit?: boolean | undefined;
239
+ tabId?: number | undefined;
240
+ }>, z.ZodObject<{
241
+ tabId: z.ZodOptional<z.ZodNumber>;
242
+ action: z.ZodLiteral<"select">;
243
+ ref: z.ZodString;
244
+ value: z.ZodString;
245
+ }, "strict", z.ZodTypeAny, {
246
+ value: string;
247
+ action: "select";
248
+ ref: string;
249
+ tabId?: number | undefined;
250
+ }, {
251
+ value: string;
252
+ action: "select";
253
+ ref: string;
254
+ tabId?: number | undefined;
255
+ }>, z.ZodObject<{
256
+ tabId: z.ZodOptional<z.ZodNumber>;
257
+ action: z.ZodLiteral<"press">;
258
+ keys: z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>;
259
+ ref: z.ZodOptional<z.ZodString>;
260
+ }, "strict", z.ZodTypeAny, {
261
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
262
+ action: "press";
263
+ ref?: string | undefined;
264
+ tabId?: number | undefined;
265
+ }, {
266
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
267
+ action: "press";
268
+ ref?: string | undefined;
269
+ tabId?: number | undefined;
270
+ }>, z.ZodObject<{
271
+ tabId: z.ZodOptional<z.ZodNumber>;
272
+ action: z.ZodLiteral<"hover">;
273
+ ref: z.ZodString;
274
+ }, "strict", z.ZodTypeAny, {
275
+ action: "hover";
276
+ ref: string;
277
+ tabId?: number | undefined;
278
+ }, {
279
+ action: "hover";
280
+ ref: string;
281
+ tabId?: number | undefined;
282
+ }>, z.ZodObject<{
283
+ tabId: z.ZodOptional<z.ZodNumber>;
284
+ action: z.ZodLiteral<"scroll">;
285
+ direction: z.ZodEnum<["up", "down", "left", "right"]>;
286
+ amount: z.ZodNumber;
287
+ }, "strict", z.ZodTypeAny, {
288
+ action: "scroll";
289
+ direction: "up" | "down" | "left" | "right";
290
+ amount: number;
291
+ tabId?: number | undefined;
292
+ }, {
293
+ action: "scroll";
294
+ direction: "up" | "down" | "left" | "right";
295
+ amount: number;
296
+ tabId?: number | undefined;
297
+ }>, z.ZodObject<{
298
+ tabId: z.ZodOptional<z.ZodNumber>;
299
+ action: z.ZodLiteral<"wait_for">;
300
+ text: z.ZodString;
301
+ ms: z.ZodOptional<z.ZodNumber>;
302
+ }, "strict", z.ZodTypeAny, {
303
+ action: "wait_for";
304
+ text: string;
305
+ ms?: number | undefined;
306
+ tabId?: number | undefined;
307
+ }, {
308
+ action: "wait_for";
309
+ text: string;
310
+ ms?: number | undefined;
311
+ tabId?: number | undefined;
312
+ }>]>;
313
+ agentName: z.ZodString;
314
+ runId: z.ZodString;
315
+ sessionId: z.ZodString;
316
+ }, "strict", z.ZodTypeAny, {
317
+ kind: "browser";
318
+ input: {
319
+ action: "tabs";
320
+ } | {
321
+ action: "new_tab";
322
+ url: string;
323
+ } | {
324
+ action: "switch_tab";
325
+ tabId: number;
326
+ } | {
327
+ action: "close_tab";
328
+ tabId: number;
329
+ } | {
330
+ action: "navigate";
331
+ url: string;
332
+ tabId?: number | undefined;
333
+ } | {
334
+ action: "back";
335
+ tabId?: number | undefined;
336
+ } | {
337
+ action: "forward";
338
+ tabId?: number | undefined;
339
+ } | {
340
+ action: "reload";
341
+ tabId?: number | undefined;
342
+ } | {
343
+ action: "snapshot";
344
+ tabId?: number | undefined;
345
+ } | {
346
+ action: "read_text";
347
+ tabId?: number | undefined;
348
+ } | {
349
+ action: "click";
350
+ ref: string;
351
+ confirm?: boolean | undefined;
352
+ tabId?: number | undefined;
353
+ } | {
354
+ action: "type";
355
+ text: string;
356
+ ref: string;
357
+ submit?: boolean | undefined;
358
+ tabId?: number | undefined;
359
+ } | {
360
+ value: string;
361
+ action: "select";
362
+ ref: string;
363
+ tabId?: number | undefined;
364
+ } | {
365
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
366
+ action: "press";
367
+ ref?: string | undefined;
368
+ tabId?: number | undefined;
369
+ } | {
370
+ action: "hover";
371
+ ref: string;
372
+ tabId?: number | undefined;
373
+ } | {
374
+ action: "scroll";
375
+ direction: "up" | "down" | "left" | "right";
376
+ amount: number;
377
+ tabId?: number | undefined;
378
+ } | {
379
+ action: "wait_for";
380
+ text: string;
381
+ ms?: number | undefined;
382
+ tabId?: number | undefined;
383
+ };
384
+ agentName: string;
385
+ runId: string;
386
+ sessionId: string;
387
+ }, {
388
+ kind: "browser";
389
+ input: {
390
+ action: "tabs";
391
+ } | {
392
+ action: "new_tab";
393
+ url: string;
394
+ } | {
395
+ action: "switch_tab";
396
+ tabId: number;
397
+ } | {
398
+ action: "close_tab";
399
+ tabId: number;
400
+ } | {
401
+ action: "navigate";
402
+ url: string;
403
+ tabId?: number | undefined;
404
+ } | {
405
+ action: "back";
406
+ tabId?: number | undefined;
407
+ } | {
408
+ action: "forward";
409
+ tabId?: number | undefined;
410
+ } | {
411
+ action: "reload";
412
+ tabId?: number | undefined;
413
+ } | {
414
+ action: "snapshot";
415
+ tabId?: number | undefined;
416
+ } | {
417
+ action: "read_text";
418
+ tabId?: number | undefined;
419
+ } | {
420
+ action: "click";
421
+ ref: string;
422
+ confirm?: boolean | undefined;
423
+ tabId?: number | undefined;
424
+ } | {
425
+ action: "type";
426
+ text: string;
427
+ ref: string;
428
+ submit?: boolean | undefined;
429
+ tabId?: number | undefined;
430
+ } | {
431
+ value: string;
432
+ action: "select";
433
+ ref: string;
434
+ tabId?: number | undefined;
435
+ } | {
436
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
437
+ action: "press";
438
+ ref?: string | undefined;
439
+ tabId?: number | undefined;
440
+ } | {
441
+ action: "hover";
442
+ ref: string;
443
+ tabId?: number | undefined;
444
+ } | {
445
+ action: "scroll";
446
+ direction: "up" | "down" | "left" | "right";
447
+ amount: number;
448
+ tabId?: number | undefined;
449
+ } | {
450
+ action: "wait_for";
451
+ text: string;
452
+ ms?: number | undefined;
453
+ tabId?: number | undefined;
454
+ };
455
+ agentName: string;
456
+ runId: string;
457
+ sessionId: string;
96
458
  }>]>;
97
459
  export type LocalToolRequest = z.infer<typeof localToolRequestSchema>;
98
460
  export declare const localToolCallSchema: z.ZodObject<{
@@ -109,13 +471,13 @@ export declare const localToolCallSchema: z.ZodObject<{
109
471
  cwd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
110
472
  timeoutMs: z.ZodNumber;
111
473
  }, "strict", z.ZodTypeAny, {
112
- kind: "exec";
113
474
  command: string;
475
+ kind: "exec";
114
476
  timeoutMs: number;
115
477
  cwd?: string | undefined;
116
478
  }, {
117
- kind: "exec";
118
479
  command: string;
480
+ kind: "exec";
119
481
  timeoutMs: number;
120
482
  cwd?: string | undefined;
121
483
  }>, z.ZodObject<{
@@ -124,12 +486,12 @@ export declare const localToolCallSchema: z.ZodObject<{
124
486
  maxBytes: z.ZodNumber;
125
487
  }, "strict", z.ZodTypeAny, {
126
488
  path: string;
127
- kind: "read_file";
128
489
  maxBytes: number;
490
+ kind: "read_file";
129
491
  }, {
130
492
  path: string;
131
- kind: "read_file";
132
493
  maxBytes: number;
494
+ kind: "read_file";
133
495
  }>, z.ZodObject<{
134
496
  kind: z.ZodLiteral<"write_file">;
135
497
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -142,6 +504,21 @@ export declare const localToolCallSchema: z.ZodObject<{
142
504
  path: string;
143
505
  kind: "write_file";
144
506
  contentsBase64: string;
507
+ }>, z.ZodObject<{
508
+ kind: z.ZodLiteral<"replace_file">;
509
+ path: z.ZodEffects<z.ZodString, string, string>;
510
+ contentsBase64: z.ZodString;
511
+ expectedRevision: z.ZodString;
512
+ }, "strict", z.ZodTypeAny, {
513
+ path: string;
514
+ kind: "replace_file";
515
+ contentsBase64: string;
516
+ expectedRevision: string;
517
+ }, {
518
+ path: string;
519
+ kind: "replace_file";
520
+ contentsBase64: string;
521
+ expectedRevision: string;
145
522
  }>, z.ZodObject<{
146
523
  kind: z.ZodLiteral<"list_files">;
147
524
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -153,16 +530,359 @@ export declare const localToolCallSchema: z.ZodObject<{
153
530
  kind: "list_files";
154
531
  }>, z.ZodObject<{
155
532
  kind: z.ZodLiteral<"driver">;
156
- command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_cancel", "terminal_list"]>;
533
+ command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_write", "terminal_cancel", "terminal_list"]>;
157
534
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
158
535
  }, "strict", z.ZodTypeAny, {
159
- kind: "driver";
160
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
536
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
161
537
  args: Record<string, unknown>;
162
- }, {
163
538
  kind: "driver";
164
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
539
+ }, {
540
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
165
541
  args: Record<string, unknown>;
542
+ kind: "driver";
543
+ }>, z.ZodObject<{
544
+ kind: z.ZodLiteral<"browser">;
545
+ input: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
546
+ action: z.ZodLiteral<"tabs">;
547
+ }, "strict", z.ZodTypeAny, {
548
+ action: "tabs";
549
+ }, {
550
+ action: "tabs";
551
+ }>, z.ZodObject<{
552
+ action: z.ZodLiteral<"new_tab">;
553
+ url: z.ZodEffects<z.ZodString, string, string>;
554
+ }, "strict", z.ZodTypeAny, {
555
+ action: "new_tab";
556
+ url: string;
557
+ }, {
558
+ action: "new_tab";
559
+ url: string;
560
+ }>, z.ZodObject<{
561
+ action: z.ZodLiteral<"switch_tab">;
562
+ tabId: z.ZodNumber;
563
+ }, "strict", z.ZodTypeAny, {
564
+ action: "switch_tab";
565
+ tabId: number;
566
+ }, {
567
+ action: "switch_tab";
568
+ tabId: number;
569
+ }>, z.ZodObject<{
570
+ action: z.ZodLiteral<"close_tab">;
571
+ tabId: z.ZodNumber;
572
+ }, "strict", z.ZodTypeAny, {
573
+ action: "close_tab";
574
+ tabId: number;
575
+ }, {
576
+ action: "close_tab";
577
+ tabId: number;
578
+ }>, z.ZodObject<{
579
+ tabId: z.ZodOptional<z.ZodNumber>;
580
+ action: z.ZodLiteral<"navigate">;
581
+ url: z.ZodEffects<z.ZodString, string, string>;
582
+ }, "strict", z.ZodTypeAny, {
583
+ action: "navigate";
584
+ url: string;
585
+ tabId?: number | undefined;
586
+ }, {
587
+ action: "navigate";
588
+ url: string;
589
+ tabId?: number | undefined;
590
+ }>, z.ZodObject<{
591
+ tabId: z.ZodOptional<z.ZodNumber>;
592
+ action: z.ZodLiteral<"back">;
593
+ }, "strict", z.ZodTypeAny, {
594
+ action: "back";
595
+ tabId?: number | undefined;
596
+ }, {
597
+ action: "back";
598
+ tabId?: number | undefined;
599
+ }>, z.ZodObject<{
600
+ tabId: z.ZodOptional<z.ZodNumber>;
601
+ action: z.ZodLiteral<"forward">;
602
+ }, "strict", z.ZodTypeAny, {
603
+ action: "forward";
604
+ tabId?: number | undefined;
605
+ }, {
606
+ action: "forward";
607
+ tabId?: number | undefined;
608
+ }>, z.ZodObject<{
609
+ tabId: z.ZodOptional<z.ZodNumber>;
610
+ action: z.ZodLiteral<"reload">;
611
+ }, "strict", z.ZodTypeAny, {
612
+ action: "reload";
613
+ tabId?: number | undefined;
614
+ }, {
615
+ action: "reload";
616
+ tabId?: number | undefined;
617
+ }>, z.ZodObject<{
618
+ tabId: z.ZodOptional<z.ZodNumber>;
619
+ action: z.ZodLiteral<"snapshot">;
620
+ }, "strict", z.ZodTypeAny, {
621
+ action: "snapshot";
622
+ tabId?: number | undefined;
623
+ }, {
624
+ action: "snapshot";
625
+ tabId?: number | undefined;
626
+ }>, z.ZodObject<{
627
+ tabId: z.ZodOptional<z.ZodNumber>;
628
+ action: z.ZodLiteral<"read_text">;
629
+ }, "strict", z.ZodTypeAny, {
630
+ action: "read_text";
631
+ tabId?: number | undefined;
632
+ }, {
633
+ action: "read_text";
634
+ tabId?: number | undefined;
635
+ }>, z.ZodObject<{
636
+ tabId: z.ZodOptional<z.ZodNumber>;
637
+ action: z.ZodLiteral<"click">;
638
+ ref: z.ZodString;
639
+ confirm: z.ZodOptional<z.ZodBoolean>;
640
+ }, "strict", z.ZodTypeAny, {
641
+ action: "click";
642
+ ref: string;
643
+ confirm?: boolean | undefined;
644
+ tabId?: number | undefined;
645
+ }, {
646
+ action: "click";
647
+ ref: string;
648
+ confirm?: boolean | undefined;
649
+ tabId?: number | undefined;
650
+ }>, z.ZodObject<{
651
+ tabId: z.ZodOptional<z.ZodNumber>;
652
+ action: z.ZodLiteral<"type">;
653
+ ref: z.ZodString;
654
+ text: z.ZodString;
655
+ submit: z.ZodOptional<z.ZodBoolean>;
656
+ }, "strict", z.ZodTypeAny, {
657
+ action: "type";
658
+ text: string;
659
+ ref: string;
660
+ submit?: boolean | undefined;
661
+ tabId?: number | undefined;
662
+ }, {
663
+ action: "type";
664
+ text: string;
665
+ ref: string;
666
+ submit?: boolean | undefined;
667
+ tabId?: number | undefined;
668
+ }>, z.ZodObject<{
669
+ tabId: z.ZodOptional<z.ZodNumber>;
670
+ action: z.ZodLiteral<"select">;
671
+ ref: z.ZodString;
672
+ value: z.ZodString;
673
+ }, "strict", z.ZodTypeAny, {
674
+ value: string;
675
+ action: "select";
676
+ ref: string;
677
+ tabId?: number | undefined;
678
+ }, {
679
+ value: string;
680
+ action: "select";
681
+ ref: string;
682
+ tabId?: number | undefined;
683
+ }>, z.ZodObject<{
684
+ tabId: z.ZodOptional<z.ZodNumber>;
685
+ action: z.ZodLiteral<"press">;
686
+ keys: z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>;
687
+ ref: z.ZodOptional<z.ZodString>;
688
+ }, "strict", z.ZodTypeAny, {
689
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
690
+ action: "press";
691
+ ref?: string | undefined;
692
+ tabId?: number | undefined;
693
+ }, {
694
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
695
+ action: "press";
696
+ ref?: string | undefined;
697
+ tabId?: number | undefined;
698
+ }>, z.ZodObject<{
699
+ tabId: z.ZodOptional<z.ZodNumber>;
700
+ action: z.ZodLiteral<"hover">;
701
+ ref: z.ZodString;
702
+ }, "strict", z.ZodTypeAny, {
703
+ action: "hover";
704
+ ref: string;
705
+ tabId?: number | undefined;
706
+ }, {
707
+ action: "hover";
708
+ ref: string;
709
+ tabId?: number | undefined;
710
+ }>, z.ZodObject<{
711
+ tabId: z.ZodOptional<z.ZodNumber>;
712
+ action: z.ZodLiteral<"scroll">;
713
+ direction: z.ZodEnum<["up", "down", "left", "right"]>;
714
+ amount: z.ZodNumber;
715
+ }, "strict", z.ZodTypeAny, {
716
+ action: "scroll";
717
+ direction: "up" | "down" | "left" | "right";
718
+ amount: number;
719
+ tabId?: number | undefined;
720
+ }, {
721
+ action: "scroll";
722
+ direction: "up" | "down" | "left" | "right";
723
+ amount: number;
724
+ tabId?: number | undefined;
725
+ }>, z.ZodObject<{
726
+ tabId: z.ZodOptional<z.ZodNumber>;
727
+ action: z.ZodLiteral<"wait_for">;
728
+ text: z.ZodString;
729
+ ms: z.ZodOptional<z.ZodNumber>;
730
+ }, "strict", z.ZodTypeAny, {
731
+ action: "wait_for";
732
+ text: string;
733
+ ms?: number | undefined;
734
+ tabId?: number | undefined;
735
+ }, {
736
+ action: "wait_for";
737
+ text: string;
738
+ ms?: number | undefined;
739
+ tabId?: number | undefined;
740
+ }>]>;
741
+ agentName: z.ZodString;
742
+ runId: z.ZodString;
743
+ sessionId: z.ZodString;
744
+ }, "strict", z.ZodTypeAny, {
745
+ kind: "browser";
746
+ input: {
747
+ action: "tabs";
748
+ } | {
749
+ action: "new_tab";
750
+ url: string;
751
+ } | {
752
+ action: "switch_tab";
753
+ tabId: number;
754
+ } | {
755
+ action: "close_tab";
756
+ tabId: number;
757
+ } | {
758
+ action: "navigate";
759
+ url: string;
760
+ tabId?: number | undefined;
761
+ } | {
762
+ action: "back";
763
+ tabId?: number | undefined;
764
+ } | {
765
+ action: "forward";
766
+ tabId?: number | undefined;
767
+ } | {
768
+ action: "reload";
769
+ tabId?: number | undefined;
770
+ } | {
771
+ action: "snapshot";
772
+ tabId?: number | undefined;
773
+ } | {
774
+ action: "read_text";
775
+ tabId?: number | undefined;
776
+ } | {
777
+ action: "click";
778
+ ref: string;
779
+ confirm?: boolean | undefined;
780
+ tabId?: number | undefined;
781
+ } | {
782
+ action: "type";
783
+ text: string;
784
+ ref: string;
785
+ submit?: boolean | undefined;
786
+ tabId?: number | undefined;
787
+ } | {
788
+ value: string;
789
+ action: "select";
790
+ ref: string;
791
+ tabId?: number | undefined;
792
+ } | {
793
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
794
+ action: "press";
795
+ ref?: string | undefined;
796
+ tabId?: number | undefined;
797
+ } | {
798
+ action: "hover";
799
+ ref: string;
800
+ tabId?: number | undefined;
801
+ } | {
802
+ action: "scroll";
803
+ direction: "up" | "down" | "left" | "right";
804
+ amount: number;
805
+ tabId?: number | undefined;
806
+ } | {
807
+ action: "wait_for";
808
+ text: string;
809
+ ms?: number | undefined;
810
+ tabId?: number | undefined;
811
+ };
812
+ agentName: string;
813
+ runId: string;
814
+ sessionId: string;
815
+ }, {
816
+ kind: "browser";
817
+ input: {
818
+ action: "tabs";
819
+ } | {
820
+ action: "new_tab";
821
+ url: string;
822
+ } | {
823
+ action: "switch_tab";
824
+ tabId: number;
825
+ } | {
826
+ action: "close_tab";
827
+ tabId: number;
828
+ } | {
829
+ action: "navigate";
830
+ url: string;
831
+ tabId?: number | undefined;
832
+ } | {
833
+ action: "back";
834
+ tabId?: number | undefined;
835
+ } | {
836
+ action: "forward";
837
+ tabId?: number | undefined;
838
+ } | {
839
+ action: "reload";
840
+ tabId?: number | undefined;
841
+ } | {
842
+ action: "snapshot";
843
+ tabId?: number | undefined;
844
+ } | {
845
+ action: "read_text";
846
+ tabId?: number | undefined;
847
+ } | {
848
+ action: "click";
849
+ ref: string;
850
+ confirm?: boolean | undefined;
851
+ tabId?: number | undefined;
852
+ } | {
853
+ action: "type";
854
+ text: string;
855
+ ref: string;
856
+ submit?: boolean | undefined;
857
+ tabId?: number | undefined;
858
+ } | {
859
+ value: string;
860
+ action: "select";
861
+ ref: string;
862
+ tabId?: number | undefined;
863
+ } | {
864
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
865
+ action: "press";
866
+ ref?: string | undefined;
867
+ tabId?: number | undefined;
868
+ } | {
869
+ action: "hover";
870
+ ref: string;
871
+ tabId?: number | undefined;
872
+ } | {
873
+ action: "scroll";
874
+ direction: "up" | "down" | "left" | "right";
875
+ amount: number;
876
+ tabId?: number | undefined;
877
+ } | {
878
+ action: "wait_for";
879
+ text: string;
880
+ ms?: number | undefined;
881
+ tabId?: number | undefined;
882
+ };
883
+ agentName: string;
884
+ runId: string;
885
+ sessionId: string;
166
886
  }>]>;
167
887
  }, "strict", z.ZodTypeAny, {
168
888
  protocolVersion: 1;
@@ -172,25 +892,101 @@ export declare const localToolCallSchema: z.ZodObject<{
172
892
  issuedAt: number;
173
893
  deadlineAt: number;
174
894
  request: {
175
- kind: "exec";
895
+ kind: "browser";
896
+ input: {
897
+ action: "tabs";
898
+ } | {
899
+ action: "new_tab";
900
+ url: string;
901
+ } | {
902
+ action: "switch_tab";
903
+ tabId: number;
904
+ } | {
905
+ action: "close_tab";
906
+ tabId: number;
907
+ } | {
908
+ action: "navigate";
909
+ url: string;
910
+ tabId?: number | undefined;
911
+ } | {
912
+ action: "back";
913
+ tabId?: number | undefined;
914
+ } | {
915
+ action: "forward";
916
+ tabId?: number | undefined;
917
+ } | {
918
+ action: "reload";
919
+ tabId?: number | undefined;
920
+ } | {
921
+ action: "snapshot";
922
+ tabId?: number | undefined;
923
+ } | {
924
+ action: "read_text";
925
+ tabId?: number | undefined;
926
+ } | {
927
+ action: "click";
928
+ ref: string;
929
+ confirm?: boolean | undefined;
930
+ tabId?: number | undefined;
931
+ } | {
932
+ action: "type";
933
+ text: string;
934
+ ref: string;
935
+ submit?: boolean | undefined;
936
+ tabId?: number | undefined;
937
+ } | {
938
+ value: string;
939
+ action: "select";
940
+ ref: string;
941
+ tabId?: number | undefined;
942
+ } | {
943
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
944
+ action: "press";
945
+ ref?: string | undefined;
946
+ tabId?: number | undefined;
947
+ } | {
948
+ action: "hover";
949
+ ref: string;
950
+ tabId?: number | undefined;
951
+ } | {
952
+ action: "scroll";
953
+ direction: "up" | "down" | "left" | "right";
954
+ amount: number;
955
+ tabId?: number | undefined;
956
+ } | {
957
+ action: "wait_for";
958
+ text: string;
959
+ ms?: number | undefined;
960
+ tabId?: number | undefined;
961
+ };
962
+ agentName: string;
963
+ runId: string;
964
+ sessionId: string;
965
+ } | {
176
966
  command: string;
967
+ kind: "exec";
177
968
  timeoutMs: number;
178
969
  cwd?: string | undefined;
179
970
  } | {
180
971
  path: string;
181
- kind: "read_file";
182
972
  maxBytes: number;
973
+ kind: "read_file";
183
974
  } | {
184
975
  path: string;
185
976
  kind: "write_file";
186
977
  contentsBase64: string;
978
+ } | {
979
+ path: string;
980
+ kind: "replace_file";
981
+ contentsBase64: string;
982
+ expectedRevision: string;
187
983
  } | {
188
984
  path: string;
189
985
  kind: "list_files";
190
986
  } | {
191
- kind: "driver";
192
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
987
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
193
988
  args: Record<string, unknown>;
989
+ kind: "driver";
194
990
  };
195
991
  }, {
196
992
  protocolVersion: 1;
@@ -200,25 +996,101 @@ export declare const localToolCallSchema: z.ZodObject<{
200
996
  issuedAt: number;
201
997
  deadlineAt: number;
202
998
  request: {
203
- kind: "exec";
999
+ kind: "browser";
1000
+ input: {
1001
+ action: "tabs";
1002
+ } | {
1003
+ action: "new_tab";
1004
+ url: string;
1005
+ } | {
1006
+ action: "switch_tab";
1007
+ tabId: number;
1008
+ } | {
1009
+ action: "close_tab";
1010
+ tabId: number;
1011
+ } | {
1012
+ action: "navigate";
1013
+ url: string;
1014
+ tabId?: number | undefined;
1015
+ } | {
1016
+ action: "back";
1017
+ tabId?: number | undefined;
1018
+ } | {
1019
+ action: "forward";
1020
+ tabId?: number | undefined;
1021
+ } | {
1022
+ action: "reload";
1023
+ tabId?: number | undefined;
1024
+ } | {
1025
+ action: "snapshot";
1026
+ tabId?: number | undefined;
1027
+ } | {
1028
+ action: "read_text";
1029
+ tabId?: number | undefined;
1030
+ } | {
1031
+ action: "click";
1032
+ ref: string;
1033
+ confirm?: boolean | undefined;
1034
+ tabId?: number | undefined;
1035
+ } | {
1036
+ action: "type";
1037
+ text: string;
1038
+ ref: string;
1039
+ submit?: boolean | undefined;
1040
+ tabId?: number | undefined;
1041
+ } | {
1042
+ value: string;
1043
+ action: "select";
1044
+ ref: string;
1045
+ tabId?: number | undefined;
1046
+ } | {
1047
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1048
+ action: "press";
1049
+ ref?: string | undefined;
1050
+ tabId?: number | undefined;
1051
+ } | {
1052
+ action: "hover";
1053
+ ref: string;
1054
+ tabId?: number | undefined;
1055
+ } | {
1056
+ action: "scroll";
1057
+ direction: "up" | "down" | "left" | "right";
1058
+ amount: number;
1059
+ tabId?: number | undefined;
1060
+ } | {
1061
+ action: "wait_for";
1062
+ text: string;
1063
+ ms?: number | undefined;
1064
+ tabId?: number | undefined;
1065
+ };
1066
+ agentName: string;
1067
+ runId: string;
1068
+ sessionId: string;
1069
+ } | {
204
1070
  command: string;
1071
+ kind: "exec";
205
1072
  timeoutMs: number;
206
1073
  cwd?: string | undefined;
207
1074
  } | {
208
1075
  path: string;
209
- kind: "read_file";
210
1076
  maxBytes: number;
1077
+ kind: "read_file";
211
1078
  } | {
212
1079
  path: string;
213
1080
  kind: "write_file";
214
1081
  contentsBase64: string;
1082
+ } | {
1083
+ path: string;
1084
+ kind: "replace_file";
1085
+ contentsBase64: string;
1086
+ expectedRevision: string;
215
1087
  } | {
216
1088
  path: string;
217
1089
  kind: "list_files";
218
1090
  } | {
219
- kind: "driver";
220
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1091
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
221
1092
  args: Record<string, unknown>;
1093
+ kind: "driver";
222
1094
  };
223
1095
  }>;
224
1096
  export type LocalToolCall = z.infer<typeof localToolCallSchema>;
@@ -238,13 +1110,13 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
238
1110
  cwd: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
239
1111
  timeoutMs: z.ZodNumber;
240
1112
  }, "strict", z.ZodTypeAny, {
241
- kind: "exec";
242
1113
  command: string;
1114
+ kind: "exec";
243
1115
  timeoutMs: number;
244
1116
  cwd?: string | undefined;
245
1117
  }, {
246
- kind: "exec";
247
1118
  command: string;
1119
+ kind: "exec";
248
1120
  timeoutMs: number;
249
1121
  cwd?: string | undefined;
250
1122
  }>, z.ZodObject<{
@@ -253,12 +1125,12 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
253
1125
  maxBytes: z.ZodNumber;
254
1126
  }, "strict", z.ZodTypeAny, {
255
1127
  path: string;
256
- kind: "read_file";
257
1128
  maxBytes: number;
1129
+ kind: "read_file";
258
1130
  }, {
259
1131
  path: string;
260
- kind: "read_file";
261
1132
  maxBytes: number;
1133
+ kind: "read_file";
262
1134
  }>, z.ZodObject<{
263
1135
  kind: z.ZodLiteral<"write_file">;
264
1136
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -271,6 +1143,21 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
271
1143
  path: string;
272
1144
  kind: "write_file";
273
1145
  contentsBase64: string;
1146
+ }>, z.ZodObject<{
1147
+ kind: z.ZodLiteral<"replace_file">;
1148
+ path: z.ZodEffects<z.ZodString, string, string>;
1149
+ contentsBase64: z.ZodString;
1150
+ expectedRevision: z.ZodString;
1151
+ }, "strict", z.ZodTypeAny, {
1152
+ path: string;
1153
+ kind: "replace_file";
1154
+ contentsBase64: string;
1155
+ expectedRevision: string;
1156
+ }, {
1157
+ path: string;
1158
+ kind: "replace_file";
1159
+ contentsBase64: string;
1160
+ expectedRevision: string;
274
1161
  }>, z.ZodObject<{
275
1162
  kind: z.ZodLiteral<"list_files">;
276
1163
  path: z.ZodEffects<z.ZodString, string, string>;
@@ -282,16 +1169,359 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
282
1169
  kind: "list_files";
283
1170
  }>, z.ZodObject<{
284
1171
  kind: z.ZodLiteral<"driver">;
285
- command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_cancel", "terminal_list"]>;
1172
+ command: z.ZodEnum<["capabilities", "screenshot", "wait", "click", "move", "drag", "type", "key", "scroll", "browser_ensure", "browser", "open_url", "terminal_start", "terminal_read", "terminal_write", "terminal_cancel", "terminal_list"]>;
286
1173
  args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
287
1174
  }, "strict", z.ZodTypeAny, {
288
- kind: "driver";
289
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1175
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
290
1176
  args: Record<string, unknown>;
291
- }, {
292
1177
  kind: "driver";
293
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1178
+ }, {
1179
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
294
1180
  args: Record<string, unknown>;
1181
+ kind: "driver";
1182
+ }>, z.ZodObject<{
1183
+ kind: z.ZodLiteral<"browser">;
1184
+ input: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
1185
+ action: z.ZodLiteral<"tabs">;
1186
+ }, "strict", z.ZodTypeAny, {
1187
+ action: "tabs";
1188
+ }, {
1189
+ action: "tabs";
1190
+ }>, z.ZodObject<{
1191
+ action: z.ZodLiteral<"new_tab">;
1192
+ url: z.ZodEffects<z.ZodString, string, string>;
1193
+ }, "strict", z.ZodTypeAny, {
1194
+ action: "new_tab";
1195
+ url: string;
1196
+ }, {
1197
+ action: "new_tab";
1198
+ url: string;
1199
+ }>, z.ZodObject<{
1200
+ action: z.ZodLiteral<"switch_tab">;
1201
+ tabId: z.ZodNumber;
1202
+ }, "strict", z.ZodTypeAny, {
1203
+ action: "switch_tab";
1204
+ tabId: number;
1205
+ }, {
1206
+ action: "switch_tab";
1207
+ tabId: number;
1208
+ }>, z.ZodObject<{
1209
+ action: z.ZodLiteral<"close_tab">;
1210
+ tabId: z.ZodNumber;
1211
+ }, "strict", z.ZodTypeAny, {
1212
+ action: "close_tab";
1213
+ tabId: number;
1214
+ }, {
1215
+ action: "close_tab";
1216
+ tabId: number;
1217
+ }>, z.ZodObject<{
1218
+ tabId: z.ZodOptional<z.ZodNumber>;
1219
+ action: z.ZodLiteral<"navigate">;
1220
+ url: z.ZodEffects<z.ZodString, string, string>;
1221
+ }, "strict", z.ZodTypeAny, {
1222
+ action: "navigate";
1223
+ url: string;
1224
+ tabId?: number | undefined;
1225
+ }, {
1226
+ action: "navigate";
1227
+ url: string;
1228
+ tabId?: number | undefined;
1229
+ }>, z.ZodObject<{
1230
+ tabId: z.ZodOptional<z.ZodNumber>;
1231
+ action: z.ZodLiteral<"back">;
1232
+ }, "strict", z.ZodTypeAny, {
1233
+ action: "back";
1234
+ tabId?: number | undefined;
1235
+ }, {
1236
+ action: "back";
1237
+ tabId?: number | undefined;
1238
+ }>, z.ZodObject<{
1239
+ tabId: z.ZodOptional<z.ZodNumber>;
1240
+ action: z.ZodLiteral<"forward">;
1241
+ }, "strict", z.ZodTypeAny, {
1242
+ action: "forward";
1243
+ tabId?: number | undefined;
1244
+ }, {
1245
+ action: "forward";
1246
+ tabId?: number | undefined;
1247
+ }>, z.ZodObject<{
1248
+ tabId: z.ZodOptional<z.ZodNumber>;
1249
+ action: z.ZodLiteral<"reload">;
1250
+ }, "strict", z.ZodTypeAny, {
1251
+ action: "reload";
1252
+ tabId?: number | undefined;
1253
+ }, {
1254
+ action: "reload";
1255
+ tabId?: number | undefined;
1256
+ }>, z.ZodObject<{
1257
+ tabId: z.ZodOptional<z.ZodNumber>;
1258
+ action: z.ZodLiteral<"snapshot">;
1259
+ }, "strict", z.ZodTypeAny, {
1260
+ action: "snapshot";
1261
+ tabId?: number | undefined;
1262
+ }, {
1263
+ action: "snapshot";
1264
+ tabId?: number | undefined;
1265
+ }>, z.ZodObject<{
1266
+ tabId: z.ZodOptional<z.ZodNumber>;
1267
+ action: z.ZodLiteral<"read_text">;
1268
+ }, "strict", z.ZodTypeAny, {
1269
+ action: "read_text";
1270
+ tabId?: number | undefined;
1271
+ }, {
1272
+ action: "read_text";
1273
+ tabId?: number | undefined;
1274
+ }>, z.ZodObject<{
1275
+ tabId: z.ZodOptional<z.ZodNumber>;
1276
+ action: z.ZodLiteral<"click">;
1277
+ ref: z.ZodString;
1278
+ confirm: z.ZodOptional<z.ZodBoolean>;
1279
+ }, "strict", z.ZodTypeAny, {
1280
+ action: "click";
1281
+ ref: string;
1282
+ confirm?: boolean | undefined;
1283
+ tabId?: number | undefined;
1284
+ }, {
1285
+ action: "click";
1286
+ ref: string;
1287
+ confirm?: boolean | undefined;
1288
+ tabId?: number | undefined;
1289
+ }>, z.ZodObject<{
1290
+ tabId: z.ZodOptional<z.ZodNumber>;
1291
+ action: z.ZodLiteral<"type">;
1292
+ ref: z.ZodString;
1293
+ text: z.ZodString;
1294
+ submit: z.ZodOptional<z.ZodBoolean>;
1295
+ }, "strict", z.ZodTypeAny, {
1296
+ action: "type";
1297
+ text: string;
1298
+ ref: string;
1299
+ submit?: boolean | undefined;
1300
+ tabId?: number | undefined;
1301
+ }, {
1302
+ action: "type";
1303
+ text: string;
1304
+ ref: string;
1305
+ submit?: boolean | undefined;
1306
+ tabId?: number | undefined;
1307
+ }>, z.ZodObject<{
1308
+ tabId: z.ZodOptional<z.ZodNumber>;
1309
+ action: z.ZodLiteral<"select">;
1310
+ ref: z.ZodString;
1311
+ value: z.ZodString;
1312
+ }, "strict", z.ZodTypeAny, {
1313
+ value: string;
1314
+ action: "select";
1315
+ ref: string;
1316
+ tabId?: number | undefined;
1317
+ }, {
1318
+ value: string;
1319
+ action: "select";
1320
+ ref: string;
1321
+ tabId?: number | undefined;
1322
+ }>, z.ZodObject<{
1323
+ tabId: z.ZodOptional<z.ZodNumber>;
1324
+ action: z.ZodLiteral<"press">;
1325
+ keys: z.ZodEnum<["Enter", "Tab", "Escape", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "PageDown", "Space"]>;
1326
+ ref: z.ZodOptional<z.ZodString>;
1327
+ }, "strict", z.ZodTypeAny, {
1328
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1329
+ action: "press";
1330
+ ref?: string | undefined;
1331
+ tabId?: number | undefined;
1332
+ }, {
1333
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1334
+ action: "press";
1335
+ ref?: string | undefined;
1336
+ tabId?: number | undefined;
1337
+ }>, z.ZodObject<{
1338
+ tabId: z.ZodOptional<z.ZodNumber>;
1339
+ action: z.ZodLiteral<"hover">;
1340
+ ref: z.ZodString;
1341
+ }, "strict", z.ZodTypeAny, {
1342
+ action: "hover";
1343
+ ref: string;
1344
+ tabId?: number | undefined;
1345
+ }, {
1346
+ action: "hover";
1347
+ ref: string;
1348
+ tabId?: number | undefined;
1349
+ }>, z.ZodObject<{
1350
+ tabId: z.ZodOptional<z.ZodNumber>;
1351
+ action: z.ZodLiteral<"scroll">;
1352
+ direction: z.ZodEnum<["up", "down", "left", "right"]>;
1353
+ amount: z.ZodNumber;
1354
+ }, "strict", z.ZodTypeAny, {
1355
+ action: "scroll";
1356
+ direction: "up" | "down" | "left" | "right";
1357
+ amount: number;
1358
+ tabId?: number | undefined;
1359
+ }, {
1360
+ action: "scroll";
1361
+ direction: "up" | "down" | "left" | "right";
1362
+ amount: number;
1363
+ tabId?: number | undefined;
1364
+ }>, z.ZodObject<{
1365
+ tabId: z.ZodOptional<z.ZodNumber>;
1366
+ action: z.ZodLiteral<"wait_for">;
1367
+ text: z.ZodString;
1368
+ ms: z.ZodOptional<z.ZodNumber>;
1369
+ }, "strict", z.ZodTypeAny, {
1370
+ action: "wait_for";
1371
+ text: string;
1372
+ ms?: number | undefined;
1373
+ tabId?: number | undefined;
1374
+ }, {
1375
+ action: "wait_for";
1376
+ text: string;
1377
+ ms?: number | undefined;
1378
+ tabId?: number | undefined;
1379
+ }>]>;
1380
+ agentName: z.ZodString;
1381
+ runId: z.ZodString;
1382
+ sessionId: z.ZodString;
1383
+ }, "strict", z.ZodTypeAny, {
1384
+ kind: "browser";
1385
+ input: {
1386
+ action: "tabs";
1387
+ } | {
1388
+ action: "new_tab";
1389
+ url: string;
1390
+ } | {
1391
+ action: "switch_tab";
1392
+ tabId: number;
1393
+ } | {
1394
+ action: "close_tab";
1395
+ tabId: number;
1396
+ } | {
1397
+ action: "navigate";
1398
+ url: string;
1399
+ tabId?: number | undefined;
1400
+ } | {
1401
+ action: "back";
1402
+ tabId?: number | undefined;
1403
+ } | {
1404
+ action: "forward";
1405
+ tabId?: number | undefined;
1406
+ } | {
1407
+ action: "reload";
1408
+ tabId?: number | undefined;
1409
+ } | {
1410
+ action: "snapshot";
1411
+ tabId?: number | undefined;
1412
+ } | {
1413
+ action: "read_text";
1414
+ tabId?: number | undefined;
1415
+ } | {
1416
+ action: "click";
1417
+ ref: string;
1418
+ confirm?: boolean | undefined;
1419
+ tabId?: number | undefined;
1420
+ } | {
1421
+ action: "type";
1422
+ text: string;
1423
+ ref: string;
1424
+ submit?: boolean | undefined;
1425
+ tabId?: number | undefined;
1426
+ } | {
1427
+ value: string;
1428
+ action: "select";
1429
+ ref: string;
1430
+ tabId?: number | undefined;
1431
+ } | {
1432
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1433
+ action: "press";
1434
+ ref?: string | undefined;
1435
+ tabId?: number | undefined;
1436
+ } | {
1437
+ action: "hover";
1438
+ ref: string;
1439
+ tabId?: number | undefined;
1440
+ } | {
1441
+ action: "scroll";
1442
+ direction: "up" | "down" | "left" | "right";
1443
+ amount: number;
1444
+ tabId?: number | undefined;
1445
+ } | {
1446
+ action: "wait_for";
1447
+ text: string;
1448
+ ms?: number | undefined;
1449
+ tabId?: number | undefined;
1450
+ };
1451
+ agentName: string;
1452
+ runId: string;
1453
+ sessionId: string;
1454
+ }, {
1455
+ kind: "browser";
1456
+ input: {
1457
+ action: "tabs";
1458
+ } | {
1459
+ action: "new_tab";
1460
+ url: string;
1461
+ } | {
1462
+ action: "switch_tab";
1463
+ tabId: number;
1464
+ } | {
1465
+ action: "close_tab";
1466
+ tabId: number;
1467
+ } | {
1468
+ action: "navigate";
1469
+ url: string;
1470
+ tabId?: number | undefined;
1471
+ } | {
1472
+ action: "back";
1473
+ tabId?: number | undefined;
1474
+ } | {
1475
+ action: "forward";
1476
+ tabId?: number | undefined;
1477
+ } | {
1478
+ action: "reload";
1479
+ tabId?: number | undefined;
1480
+ } | {
1481
+ action: "snapshot";
1482
+ tabId?: number | undefined;
1483
+ } | {
1484
+ action: "read_text";
1485
+ tabId?: number | undefined;
1486
+ } | {
1487
+ action: "click";
1488
+ ref: string;
1489
+ confirm?: boolean | undefined;
1490
+ tabId?: number | undefined;
1491
+ } | {
1492
+ action: "type";
1493
+ text: string;
1494
+ ref: string;
1495
+ submit?: boolean | undefined;
1496
+ tabId?: number | undefined;
1497
+ } | {
1498
+ value: string;
1499
+ action: "select";
1500
+ ref: string;
1501
+ tabId?: number | undefined;
1502
+ } | {
1503
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1504
+ action: "press";
1505
+ ref?: string | undefined;
1506
+ tabId?: number | undefined;
1507
+ } | {
1508
+ action: "hover";
1509
+ ref: string;
1510
+ tabId?: number | undefined;
1511
+ } | {
1512
+ action: "scroll";
1513
+ direction: "up" | "down" | "left" | "right";
1514
+ amount: number;
1515
+ tabId?: number | undefined;
1516
+ } | {
1517
+ action: "wait_for";
1518
+ text: string;
1519
+ ms?: number | undefined;
1520
+ tabId?: number | undefined;
1521
+ };
1522
+ agentName: string;
1523
+ runId: string;
1524
+ sessionId: string;
295
1525
  }>]>;
296
1526
  }, "strict", z.ZodTypeAny, {
297
1527
  protocolVersion: 1;
@@ -301,25 +1531,101 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
301
1531
  issuedAt: number;
302
1532
  deadlineAt: number;
303
1533
  request: {
304
- kind: "exec";
1534
+ kind: "browser";
1535
+ input: {
1536
+ action: "tabs";
1537
+ } | {
1538
+ action: "new_tab";
1539
+ url: string;
1540
+ } | {
1541
+ action: "switch_tab";
1542
+ tabId: number;
1543
+ } | {
1544
+ action: "close_tab";
1545
+ tabId: number;
1546
+ } | {
1547
+ action: "navigate";
1548
+ url: string;
1549
+ tabId?: number | undefined;
1550
+ } | {
1551
+ action: "back";
1552
+ tabId?: number | undefined;
1553
+ } | {
1554
+ action: "forward";
1555
+ tabId?: number | undefined;
1556
+ } | {
1557
+ action: "reload";
1558
+ tabId?: number | undefined;
1559
+ } | {
1560
+ action: "snapshot";
1561
+ tabId?: number | undefined;
1562
+ } | {
1563
+ action: "read_text";
1564
+ tabId?: number | undefined;
1565
+ } | {
1566
+ action: "click";
1567
+ ref: string;
1568
+ confirm?: boolean | undefined;
1569
+ tabId?: number | undefined;
1570
+ } | {
1571
+ action: "type";
1572
+ text: string;
1573
+ ref: string;
1574
+ submit?: boolean | undefined;
1575
+ tabId?: number | undefined;
1576
+ } | {
1577
+ value: string;
1578
+ action: "select";
1579
+ ref: string;
1580
+ tabId?: number | undefined;
1581
+ } | {
1582
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1583
+ action: "press";
1584
+ ref?: string | undefined;
1585
+ tabId?: number | undefined;
1586
+ } | {
1587
+ action: "hover";
1588
+ ref: string;
1589
+ tabId?: number | undefined;
1590
+ } | {
1591
+ action: "scroll";
1592
+ direction: "up" | "down" | "left" | "right";
1593
+ amount: number;
1594
+ tabId?: number | undefined;
1595
+ } | {
1596
+ action: "wait_for";
1597
+ text: string;
1598
+ ms?: number | undefined;
1599
+ tabId?: number | undefined;
1600
+ };
1601
+ agentName: string;
1602
+ runId: string;
1603
+ sessionId: string;
1604
+ } | {
305
1605
  command: string;
1606
+ kind: "exec";
306
1607
  timeoutMs: number;
307
1608
  cwd?: string | undefined;
308
1609
  } | {
309
1610
  path: string;
310
- kind: "read_file";
311
1611
  maxBytes: number;
1612
+ kind: "read_file";
312
1613
  } | {
313
1614
  path: string;
314
1615
  kind: "write_file";
315
1616
  contentsBase64: string;
1617
+ } | {
1618
+ path: string;
1619
+ kind: "replace_file";
1620
+ contentsBase64: string;
1621
+ expectedRevision: string;
316
1622
  } | {
317
1623
  path: string;
318
1624
  kind: "list_files";
319
1625
  } | {
320
- kind: "driver";
321
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1626
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
322
1627
  args: Record<string, unknown>;
1628
+ kind: "driver";
323
1629
  };
324
1630
  }, {
325
1631
  protocolVersion: 1;
@@ -329,25 +1635,101 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
329
1635
  issuedAt: number;
330
1636
  deadlineAt: number;
331
1637
  request: {
332
- kind: "exec";
1638
+ kind: "browser";
1639
+ input: {
1640
+ action: "tabs";
1641
+ } | {
1642
+ action: "new_tab";
1643
+ url: string;
1644
+ } | {
1645
+ action: "switch_tab";
1646
+ tabId: number;
1647
+ } | {
1648
+ action: "close_tab";
1649
+ tabId: number;
1650
+ } | {
1651
+ action: "navigate";
1652
+ url: string;
1653
+ tabId?: number | undefined;
1654
+ } | {
1655
+ action: "back";
1656
+ tabId?: number | undefined;
1657
+ } | {
1658
+ action: "forward";
1659
+ tabId?: number | undefined;
1660
+ } | {
1661
+ action: "reload";
1662
+ tabId?: number | undefined;
1663
+ } | {
1664
+ action: "snapshot";
1665
+ tabId?: number | undefined;
1666
+ } | {
1667
+ action: "read_text";
1668
+ tabId?: number | undefined;
1669
+ } | {
1670
+ action: "click";
1671
+ ref: string;
1672
+ confirm?: boolean | undefined;
1673
+ tabId?: number | undefined;
1674
+ } | {
1675
+ action: "type";
1676
+ text: string;
1677
+ ref: string;
1678
+ submit?: boolean | undefined;
1679
+ tabId?: number | undefined;
1680
+ } | {
1681
+ value: string;
1682
+ action: "select";
1683
+ ref: string;
1684
+ tabId?: number | undefined;
1685
+ } | {
1686
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1687
+ action: "press";
1688
+ ref?: string | undefined;
1689
+ tabId?: number | undefined;
1690
+ } | {
1691
+ action: "hover";
1692
+ ref: string;
1693
+ tabId?: number | undefined;
1694
+ } | {
1695
+ action: "scroll";
1696
+ direction: "up" | "down" | "left" | "right";
1697
+ amount: number;
1698
+ tabId?: number | undefined;
1699
+ } | {
1700
+ action: "wait_for";
1701
+ text: string;
1702
+ ms?: number | undefined;
1703
+ tabId?: number | undefined;
1704
+ };
1705
+ agentName: string;
1706
+ runId: string;
1707
+ sessionId: string;
1708
+ } | {
333
1709
  command: string;
1710
+ kind: "exec";
334
1711
  timeoutMs: number;
335
1712
  cwd?: string | undefined;
336
1713
  } | {
337
1714
  path: string;
338
- kind: "read_file";
339
1715
  maxBytes: number;
1716
+ kind: "read_file";
340
1717
  } | {
341
1718
  path: string;
342
1719
  kind: "write_file";
343
1720
  contentsBase64: string;
1721
+ } | {
1722
+ path: string;
1723
+ kind: "replace_file";
1724
+ contentsBase64: string;
1725
+ expectedRevision: string;
344
1726
  } | {
345
1727
  path: string;
346
1728
  kind: "list_files";
347
1729
  } | {
348
- kind: "driver";
349
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1730
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
350
1731
  args: Record<string, unknown>;
1732
+ kind: "driver";
351
1733
  };
352
1734
  }>, "many">;
353
1735
  }, "strict", z.ZodTypeAny, {
@@ -360,25 +1742,101 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
360
1742
  issuedAt: number;
361
1743
  deadlineAt: number;
362
1744
  request: {
363
- kind: "exec";
1745
+ kind: "browser";
1746
+ input: {
1747
+ action: "tabs";
1748
+ } | {
1749
+ action: "new_tab";
1750
+ url: string;
1751
+ } | {
1752
+ action: "switch_tab";
1753
+ tabId: number;
1754
+ } | {
1755
+ action: "close_tab";
1756
+ tabId: number;
1757
+ } | {
1758
+ action: "navigate";
1759
+ url: string;
1760
+ tabId?: number | undefined;
1761
+ } | {
1762
+ action: "back";
1763
+ tabId?: number | undefined;
1764
+ } | {
1765
+ action: "forward";
1766
+ tabId?: number | undefined;
1767
+ } | {
1768
+ action: "reload";
1769
+ tabId?: number | undefined;
1770
+ } | {
1771
+ action: "snapshot";
1772
+ tabId?: number | undefined;
1773
+ } | {
1774
+ action: "read_text";
1775
+ tabId?: number | undefined;
1776
+ } | {
1777
+ action: "click";
1778
+ ref: string;
1779
+ confirm?: boolean | undefined;
1780
+ tabId?: number | undefined;
1781
+ } | {
1782
+ action: "type";
1783
+ text: string;
1784
+ ref: string;
1785
+ submit?: boolean | undefined;
1786
+ tabId?: number | undefined;
1787
+ } | {
1788
+ value: string;
1789
+ action: "select";
1790
+ ref: string;
1791
+ tabId?: number | undefined;
1792
+ } | {
1793
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1794
+ action: "press";
1795
+ ref?: string | undefined;
1796
+ tabId?: number | undefined;
1797
+ } | {
1798
+ action: "hover";
1799
+ ref: string;
1800
+ tabId?: number | undefined;
1801
+ } | {
1802
+ action: "scroll";
1803
+ direction: "up" | "down" | "left" | "right";
1804
+ amount: number;
1805
+ tabId?: number | undefined;
1806
+ } | {
1807
+ action: "wait_for";
1808
+ text: string;
1809
+ ms?: number | undefined;
1810
+ tabId?: number | undefined;
1811
+ };
1812
+ agentName: string;
1813
+ runId: string;
1814
+ sessionId: string;
1815
+ } | {
364
1816
  command: string;
1817
+ kind: "exec";
365
1818
  timeoutMs: number;
366
1819
  cwd?: string | undefined;
367
1820
  } | {
368
1821
  path: string;
369
- kind: "read_file";
370
1822
  maxBytes: number;
1823
+ kind: "read_file";
371
1824
  } | {
372
1825
  path: string;
373
1826
  kind: "write_file";
374
1827
  contentsBase64: string;
1828
+ } | {
1829
+ path: string;
1830
+ kind: "replace_file";
1831
+ contentsBase64: string;
1832
+ expectedRevision: string;
375
1833
  } | {
376
1834
  path: string;
377
1835
  kind: "list_files";
378
1836
  } | {
379
- kind: "driver";
380
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1837
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
381
1838
  args: Record<string, unknown>;
1839
+ kind: "driver";
382
1840
  };
383
1841
  }[];
384
1842
  }, {
@@ -391,25 +1849,101 @@ export declare const localToolPollResponseSchema: z.ZodObject<{
391
1849
  issuedAt: number;
392
1850
  deadlineAt: number;
393
1851
  request: {
394
- kind: "exec";
1852
+ kind: "browser";
1853
+ input: {
1854
+ action: "tabs";
1855
+ } | {
1856
+ action: "new_tab";
1857
+ url: string;
1858
+ } | {
1859
+ action: "switch_tab";
1860
+ tabId: number;
1861
+ } | {
1862
+ action: "close_tab";
1863
+ tabId: number;
1864
+ } | {
1865
+ action: "navigate";
1866
+ url: string;
1867
+ tabId?: number | undefined;
1868
+ } | {
1869
+ action: "back";
1870
+ tabId?: number | undefined;
1871
+ } | {
1872
+ action: "forward";
1873
+ tabId?: number | undefined;
1874
+ } | {
1875
+ action: "reload";
1876
+ tabId?: number | undefined;
1877
+ } | {
1878
+ action: "snapshot";
1879
+ tabId?: number | undefined;
1880
+ } | {
1881
+ action: "read_text";
1882
+ tabId?: number | undefined;
1883
+ } | {
1884
+ action: "click";
1885
+ ref: string;
1886
+ confirm?: boolean | undefined;
1887
+ tabId?: number | undefined;
1888
+ } | {
1889
+ action: "type";
1890
+ text: string;
1891
+ ref: string;
1892
+ submit?: boolean | undefined;
1893
+ tabId?: number | undefined;
1894
+ } | {
1895
+ value: string;
1896
+ action: "select";
1897
+ ref: string;
1898
+ tabId?: number | undefined;
1899
+ } | {
1900
+ keys: "Enter" | "Tab" | "Escape" | "ArrowUp" | "ArrowDown" | "ArrowLeft" | "ArrowRight" | "PageDown" | "Space";
1901
+ action: "press";
1902
+ ref?: string | undefined;
1903
+ tabId?: number | undefined;
1904
+ } | {
1905
+ action: "hover";
1906
+ ref: string;
1907
+ tabId?: number | undefined;
1908
+ } | {
1909
+ action: "scroll";
1910
+ direction: "up" | "down" | "left" | "right";
1911
+ amount: number;
1912
+ tabId?: number | undefined;
1913
+ } | {
1914
+ action: "wait_for";
1915
+ text: string;
1916
+ ms?: number | undefined;
1917
+ tabId?: number | undefined;
1918
+ };
1919
+ agentName: string;
1920
+ runId: string;
1921
+ sessionId: string;
1922
+ } | {
395
1923
  command: string;
1924
+ kind: "exec";
396
1925
  timeoutMs: number;
397
1926
  cwd?: string | undefined;
398
1927
  } | {
399
1928
  path: string;
400
- kind: "read_file";
401
1929
  maxBytes: number;
1930
+ kind: "read_file";
402
1931
  } | {
403
1932
  path: string;
404
1933
  kind: "write_file";
405
1934
  contentsBase64: string;
1935
+ } | {
1936
+ path: string;
1937
+ kind: "replace_file";
1938
+ contentsBase64: string;
1939
+ expectedRevision: string;
406
1940
  } | {
407
1941
  path: string;
408
1942
  kind: "list_files";
409
1943
  } | {
410
- kind: "driver";
411
- command: "screenshot" | "browser" | "type" | "capabilities" | "wait" | "click" | "move" | "drag" | "key" | "scroll" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_cancel" | "terminal_list";
1944
+ command: "type" | "click" | "move" | "drag" | "key" | "scroll" | "wait" | "browser" | "screenshot" | "capabilities" | "browser_ensure" | "open_url" | "terminal_start" | "terminal_read" | "terminal_write" | "terminal_cancel" | "terminal_list";
412
1945
  args: Record<string, unknown>;
1946
+ kind: "driver";
413
1947
  };
414
1948
  }[];
415
1949
  }>;
@@ -462,21 +1996,21 @@ export declare const localToolResultSchema: z.ZodObject<{
462
1996
  detail?: Record<string, unknown> | undefined;
463
1997
  }>;
464
1998
  }, "strict", z.ZodTypeAny, {
465
- ok: false;
466
1999
  error: {
467
2000
  code: string;
468
2001
  message: string;
469
2002
  missing?: string[] | undefined;
470
2003
  detail?: Record<string, unknown> | undefined;
471
2004
  };
472
- }, {
473
2005
  ok: false;
2006
+ }, {
474
2007
  error: {
475
2008
  code: string;
476
2009
  message: string;
477
2010
  missing?: string[] | undefined;
478
2011
  detail?: Record<string, unknown> | undefined;
479
2012
  };
2013
+ ok: false;
480
2014
  }>]>;
481
2015
  }, "strict", z.ZodTypeAny, {
482
2016
  protocolVersion: 1;
@@ -485,13 +2019,13 @@ export declare const localToolResultSchema: z.ZodObject<{
485
2019
  ok: true;
486
2020
  result: Record<string, unknown>;
487
2021
  } | {
488
- ok: false;
489
2022
  error: {
490
2023
  code: string;
491
2024
  message: string;
492
2025
  missing?: string[] | undefined;
493
2026
  detail?: Record<string, unknown> | undefined;
494
2027
  };
2028
+ ok: false;
495
2029
  };
496
2030
  }, {
497
2031
  protocolVersion: 1;
@@ -500,13 +2034,13 @@ export declare const localToolResultSchema: z.ZodObject<{
500
2034
  ok: true;
501
2035
  result: Record<string, unknown>;
502
2036
  } | {
503
- ok: false;
504
2037
  error: {
505
2038
  code: string;
506
2039
  message: string;
507
2040
  missing?: string[] | undefined;
508
2041
  detail?: Record<string, unknown> | undefined;
509
2042
  };
2043
+ ok: false;
510
2044
  };
511
2045
  }>;
512
2046
  export type LocalToolResult = z.infer<typeof localToolResultSchema>;