@nodetool-ai/browser 0.8.1

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.
Files changed (43) hide show
  1. package/README.md +60 -0
  2. package/dist/.nodetool-build-stamp +1 -0
  3. package/dist/actions.d.ts +64 -0
  4. package/dist/actions.d.ts.map +1 -0
  5. package/dist/actions.js +468 -0
  6. package/dist/actions.js.map +1 -0
  7. package/dist/capture.d.ts +17 -0
  8. package/dist/capture.d.ts.map +1 -0
  9. package/dist/capture.js +95 -0
  10. package/dist/capture.js.map +1 -0
  11. package/dist/cdp-page.d.ts +125 -0
  12. package/dist/cdp-page.d.ts.map +1 -0
  13. package/dist/cdp-page.js +458 -0
  14. package/dist/cdp-page.js.map +1 -0
  15. package/dist/extension/channel.d.ts +28 -0
  16. package/dist/extension/channel.d.ts.map +1 -0
  17. package/dist/extension/channel.js +30 -0
  18. package/dist/extension/channel.js.map +1 -0
  19. package/dist/extension/client.d.ts +129 -0
  20. package/dist/extension/client.d.ts.map +1 -0
  21. package/dist/extension/client.js +352 -0
  22. package/dist/extension/client.js.map +1 -0
  23. package/dist/extension/page.d.ts +38 -0
  24. package/dist/extension/page.d.ts.map +1 -0
  25. package/dist/extension/page.js +50 -0
  26. package/dist/extension/page.js.map +1 -0
  27. package/dist/extension/protocol.d.ts +162 -0
  28. package/dist/extension/protocol.d.ts.map +1 -0
  29. package/dist/extension/protocol.js +45 -0
  30. package/dist/extension/protocol.js.map +1 -0
  31. package/dist/index.d.ts +30 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +30 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/schemas.d.ts +698 -0
  36. package/dist/schemas.d.ts.map +1 -0
  37. package/dist/schemas.js +262 -0
  38. package/dist/schemas.js.map +1 -0
  39. package/dist/upload.d.ts +24 -0
  40. package/dist/upload.d.ts.map +1 -0
  41. package/dist/upload.js +144 -0
  42. package/dist/upload.js.map +1 -0
  43. package/package.json +66 -0
@@ -0,0 +1,698 @@
1
+ import { z } from "zod";
2
+ export declare const BrowserViewInput: z.ZodObject<{
3
+ include_screenshot: z.ZodOptional<z.ZodBoolean>;
4
+ }, "strip", z.ZodTypeAny, {
5
+ include_screenshot?: boolean | undefined;
6
+ }, {
7
+ include_screenshot?: boolean | undefined;
8
+ }>;
9
+ export type BrowserViewInput = z.infer<typeof BrowserViewInput>;
10
+ export declare const BrowserElement: z.ZodObject<{
11
+ index: z.ZodNumber;
12
+ tag: z.ZodString;
13
+ role: z.ZodNullable<z.ZodString>;
14
+ text: z.ZodString;
15
+ attributes: z.ZodRecord<z.ZodString, z.ZodString>;
16
+ bbox: z.ZodObject<{
17
+ x: z.ZodNumber;
18
+ y: z.ZodNumber;
19
+ width: z.ZodNumber;
20
+ height: z.ZodNumber;
21
+ }, "strip", z.ZodTypeAny, {
22
+ x: number;
23
+ y: number;
24
+ width: number;
25
+ height: number;
26
+ }, {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ }>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ index: number;
34
+ tag: string;
35
+ role: string | null;
36
+ text: string;
37
+ attributes: Record<string, string>;
38
+ bbox: {
39
+ x: number;
40
+ y: number;
41
+ width: number;
42
+ height: number;
43
+ };
44
+ }, {
45
+ index: number;
46
+ tag: string;
47
+ role: string | null;
48
+ text: string;
49
+ attributes: Record<string, string>;
50
+ bbox: {
51
+ x: number;
52
+ y: number;
53
+ width: number;
54
+ height: number;
55
+ };
56
+ }>;
57
+ export type BrowserElement = z.infer<typeof BrowserElement>;
58
+ export declare const BrowserViewOutput: z.ZodObject<{
59
+ url: z.ZodString;
60
+ title: z.ZodString;
61
+ viewport: z.ZodObject<{
62
+ width: z.ZodNumber;
63
+ height: z.ZodNumber;
64
+ }, "strip", z.ZodTypeAny, {
65
+ width: number;
66
+ height: number;
67
+ }, {
68
+ width: number;
69
+ height: number;
70
+ }>;
71
+ elements: z.ZodArray<z.ZodObject<{
72
+ index: z.ZodNumber;
73
+ tag: z.ZodString;
74
+ role: z.ZodNullable<z.ZodString>;
75
+ text: z.ZodString;
76
+ attributes: z.ZodRecord<z.ZodString, z.ZodString>;
77
+ bbox: z.ZodObject<{
78
+ x: z.ZodNumber;
79
+ y: z.ZodNumber;
80
+ width: z.ZodNumber;
81
+ height: z.ZodNumber;
82
+ }, "strip", z.ZodTypeAny, {
83
+ x: number;
84
+ y: number;
85
+ width: number;
86
+ height: number;
87
+ }, {
88
+ x: number;
89
+ y: number;
90
+ width: number;
91
+ height: number;
92
+ }>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ index: number;
95
+ tag: string;
96
+ role: string | null;
97
+ text: string;
98
+ attributes: Record<string, string>;
99
+ bbox: {
100
+ x: number;
101
+ y: number;
102
+ width: number;
103
+ height: number;
104
+ };
105
+ }, {
106
+ index: number;
107
+ tag: string;
108
+ role: string | null;
109
+ text: string;
110
+ attributes: Record<string, string>;
111
+ bbox: {
112
+ x: number;
113
+ y: number;
114
+ width: number;
115
+ height: number;
116
+ };
117
+ }>, "many">;
118
+ screenshot_png_b64: z.ZodNullable<z.ZodString>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ url: string;
121
+ title: string;
122
+ viewport: {
123
+ width: number;
124
+ height: number;
125
+ };
126
+ elements: {
127
+ index: number;
128
+ tag: string;
129
+ role: string | null;
130
+ text: string;
131
+ attributes: Record<string, string>;
132
+ bbox: {
133
+ x: number;
134
+ y: number;
135
+ width: number;
136
+ height: number;
137
+ };
138
+ }[];
139
+ screenshot_png_b64: string | null;
140
+ }, {
141
+ url: string;
142
+ title: string;
143
+ viewport: {
144
+ width: number;
145
+ height: number;
146
+ };
147
+ elements: {
148
+ index: number;
149
+ tag: string;
150
+ role: string | null;
151
+ text: string;
152
+ attributes: Record<string, string>;
153
+ bbox: {
154
+ x: number;
155
+ y: number;
156
+ width: number;
157
+ height: number;
158
+ };
159
+ }[];
160
+ screenshot_png_b64: string | null;
161
+ }>;
162
+ export type BrowserViewOutput = z.infer<typeof BrowserViewOutput>;
163
+ export declare const BrowserNavigateInput: z.ZodObject<{
164
+ url: z.ZodString;
165
+ wait_until: z.ZodOptional<z.ZodEnum<["load", "domcontentloaded", "networkidle"]>>;
166
+ }, "strip", z.ZodTypeAny, {
167
+ url: string;
168
+ wait_until?: "domcontentloaded" | "load" | "networkidle" | undefined;
169
+ }, {
170
+ url: string;
171
+ wait_until?: "domcontentloaded" | "load" | "networkidle" | undefined;
172
+ }>;
173
+ export type BrowserNavigateInput = z.infer<typeof BrowserNavigateInput>;
174
+ export declare const BrowserNavigateOutput: z.ZodObject<{
175
+ url: z.ZodString;
176
+ title: z.ZodString;
177
+ status: z.ZodNullable<z.ZodNumber>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ url: string;
180
+ title: string;
181
+ status: number | null;
182
+ }, {
183
+ url: string;
184
+ title: string;
185
+ status: number | null;
186
+ }>;
187
+ export type BrowserNavigateOutput = z.infer<typeof BrowserNavigateOutput>;
188
+ /**
189
+ * `transport` is how a caller switches between the headless Chrome this
190
+ * process launches and the user's own logged-in Chrome behind the extension
191
+ * relay. It only takes effect on a restart: the session is a process
192
+ * singleton, so switching means tearing the current one down.
193
+ */
194
+ export declare const BrowserTransport: z.ZodEnum<["local", "extension"]>;
195
+ export type BrowserTransport = z.infer<typeof BrowserTransport>;
196
+ export declare const BrowserRestartInput: z.ZodObject<{
197
+ url: z.ZodOptional<z.ZodString>;
198
+ transport: z.ZodOptional<z.ZodEnum<["local", "extension"]>>;
199
+ }, "strip", z.ZodTypeAny, {
200
+ url?: string | undefined;
201
+ transport?: "extension" | "local" | undefined;
202
+ }, {
203
+ url?: string | undefined;
204
+ transport?: "extension" | "local" | undefined;
205
+ }>;
206
+ export type BrowserRestartInput = z.infer<typeof BrowserRestartInput>;
207
+ export declare const BrowserRestartOutput: z.ZodObject<{
208
+ url: z.ZodString;
209
+ transport: z.ZodEnum<["local", "extension"]>;
210
+ }, "strip", z.ZodTypeAny, {
211
+ url: string;
212
+ transport: "extension" | "local";
213
+ }, {
214
+ url: string;
215
+ transport: "extension" | "local";
216
+ }>;
217
+ export type BrowserRestartOutput = z.infer<typeof BrowserRestartOutput>;
218
+ /** What `browser_status` answers without opening a session. */
219
+ export declare const BrowserStatusOutput: z.ZodObject<{
220
+ transport: z.ZodEnum<["local", "extension"]>;
221
+ /** Whether a page session is already open in this process. */
222
+ session_open: z.ZodBoolean;
223
+ /**
224
+ * Whether a Chrome extension currently holds the `/ws/extension` socket.
225
+ * `null` when this process cannot answer — it is not the server holding the
226
+ * bridge, so it would have to open a socket to find out.
227
+ */
228
+ extension_connected: z.ZodNullable<z.ZodBoolean>;
229
+ url: z.ZodNullable<z.ZodString>;
230
+ title: z.ZodNullable<z.ZodString>;
231
+ /** What to do next when the session cannot be driven as configured. */
232
+ hint: z.ZodNullable<z.ZodString>;
233
+ }, "strip", z.ZodTypeAny, {
234
+ transport: "extension" | "local";
235
+ session_open: boolean;
236
+ extension_connected: boolean | null;
237
+ url: string | null;
238
+ title: string | null;
239
+ hint: string | null;
240
+ }, {
241
+ transport: "extension" | "local";
242
+ session_open: boolean;
243
+ extension_connected: boolean | null;
244
+ url: string | null;
245
+ title: string | null;
246
+ hint: string | null;
247
+ }>;
248
+ export type BrowserStatusOutput = z.infer<typeof BrowserStatusOutput>;
249
+ export declare const BrowserClickInput: z.ZodEffects<z.ZodObject<{
250
+ index: z.ZodOptional<z.ZodNumber>;
251
+ coordinate_x: z.ZodOptional<z.ZodNumber>;
252
+ coordinate_y: z.ZodOptional<z.ZodNumber>;
253
+ }, "strip", z.ZodTypeAny, {
254
+ index?: number | undefined;
255
+ coordinate_x?: number | undefined;
256
+ coordinate_y?: number | undefined;
257
+ }, {
258
+ index?: number | undefined;
259
+ coordinate_x?: number | undefined;
260
+ coordinate_y?: number | undefined;
261
+ }>, {
262
+ index?: number | undefined;
263
+ coordinate_x?: number | undefined;
264
+ coordinate_y?: number | undefined;
265
+ }, {
266
+ index?: number | undefined;
267
+ coordinate_x?: number | undefined;
268
+ coordinate_y?: number | undefined;
269
+ }>;
270
+ export type BrowserClickInput = z.infer<typeof BrowserClickInput>;
271
+ export declare const BrowserClickOutput: z.ZodObject<{
272
+ clicked: z.ZodLiteral<true>;
273
+ }, "strip", z.ZodTypeAny, {
274
+ clicked: true;
275
+ }, {
276
+ clicked: true;
277
+ }>;
278
+ export type BrowserClickOutput = z.infer<typeof BrowserClickOutput>;
279
+ export declare const BrowserInputTextInput: z.ZodEffects<z.ZodObject<{
280
+ text: z.ZodString;
281
+ press_enter: z.ZodOptional<z.ZodBoolean>;
282
+ index: z.ZodOptional<z.ZodNumber>;
283
+ coordinate_x: z.ZodOptional<z.ZodNumber>;
284
+ coordinate_y: z.ZodOptional<z.ZodNumber>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ text: string;
287
+ press_enter?: boolean | undefined;
288
+ index?: number | undefined;
289
+ coordinate_x?: number | undefined;
290
+ coordinate_y?: number | undefined;
291
+ }, {
292
+ text: string;
293
+ press_enter?: boolean | undefined;
294
+ index?: number | undefined;
295
+ coordinate_x?: number | undefined;
296
+ coordinate_y?: number | undefined;
297
+ }>, {
298
+ text: string;
299
+ press_enter?: boolean | undefined;
300
+ index?: number | undefined;
301
+ coordinate_x?: number | undefined;
302
+ coordinate_y?: number | undefined;
303
+ }, {
304
+ text: string;
305
+ press_enter?: boolean | undefined;
306
+ index?: number | undefined;
307
+ coordinate_x?: number | undefined;
308
+ coordinate_y?: number | undefined;
309
+ }>;
310
+ export type BrowserInputTextInput = z.infer<typeof BrowserInputTextInput>;
311
+ export declare const BrowserInputTextOutput: z.ZodObject<{
312
+ typed: z.ZodLiteral<true>;
313
+ }, "strip", z.ZodTypeAny, {
314
+ typed: true;
315
+ }, {
316
+ typed: true;
317
+ }>;
318
+ export type BrowserInputTextOutput = z.infer<typeof BrowserInputTextOutput>;
319
+ export declare const BrowserMoveMouseInput: z.ZodObject<{
320
+ coordinate_x: z.ZodNumber;
321
+ coordinate_y: z.ZodNumber;
322
+ }, "strip", z.ZodTypeAny, {
323
+ coordinate_x: number;
324
+ coordinate_y: number;
325
+ }, {
326
+ coordinate_x: number;
327
+ coordinate_y: number;
328
+ }>;
329
+ export type BrowserMoveMouseInput = z.infer<typeof BrowserMoveMouseInput>;
330
+ export declare const BrowserMoveMouseOutput: z.ZodObject<{
331
+ moved: z.ZodLiteral<true>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ moved: true;
334
+ }, {
335
+ moved: true;
336
+ }>;
337
+ export type BrowserMoveMouseOutput = z.infer<typeof BrowserMoveMouseOutput>;
338
+ export declare const BrowserPressKeyInput: z.ZodObject<{
339
+ key: z.ZodString;
340
+ }, "strip", z.ZodTypeAny, {
341
+ key: string;
342
+ }, {
343
+ key: string;
344
+ }>;
345
+ export type BrowserPressKeyInput = z.infer<typeof BrowserPressKeyInput>;
346
+ export declare const BrowserPressKeyOutput: z.ZodObject<{
347
+ pressed: z.ZodLiteral<true>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ pressed: true;
350
+ }, {
351
+ pressed: true;
352
+ }>;
353
+ export type BrowserPressKeyOutput = z.infer<typeof BrowserPressKeyOutput>;
354
+ export declare const BrowserSelectOptionInput: z.ZodObject<{
355
+ index: z.ZodNumber;
356
+ option: z.ZodString;
357
+ }, "strip", z.ZodTypeAny, {
358
+ index: number;
359
+ option: string;
360
+ }, {
361
+ index: number;
362
+ option: string;
363
+ }>;
364
+ export type BrowserSelectOptionInput = z.infer<typeof BrowserSelectOptionInput>;
365
+ export declare const BrowserSelectOptionOutput: z.ZodObject<{
366
+ selected: z.ZodArray<z.ZodString, "many">;
367
+ }, "strip", z.ZodTypeAny, {
368
+ selected: string[];
369
+ }, {
370
+ selected: string[];
371
+ }>;
372
+ export type BrowserSelectOptionOutput = z.infer<typeof BrowserSelectOptionOutput>;
373
+ export declare const BrowserScrollInput: z.ZodObject<{
374
+ to_top: z.ZodOptional<z.ZodBoolean>;
375
+ to_bottom: z.ZodOptional<z.ZodBoolean>;
376
+ pixels: z.ZodOptional<z.ZodNumber>;
377
+ }, "strip", z.ZodTypeAny, {
378
+ to_top?: boolean | undefined;
379
+ to_bottom?: boolean | undefined;
380
+ pixels?: number | undefined;
381
+ }, {
382
+ to_top?: boolean | undefined;
383
+ to_bottom?: boolean | undefined;
384
+ pixels?: number | undefined;
385
+ }>;
386
+ export type BrowserScrollInput = z.infer<typeof BrowserScrollInput>;
387
+ export declare const BrowserScrollOutput: z.ZodObject<{
388
+ scroll_y: z.ZodNumber;
389
+ }, "strip", z.ZodTypeAny, {
390
+ scroll_y: number;
391
+ }, {
392
+ scroll_y: number;
393
+ }>;
394
+ export type BrowserScrollOutput = z.infer<typeof BrowserScrollOutput>;
395
+ export declare const BrowserConsoleExecInput: z.ZodObject<{
396
+ javascript: z.ZodString;
397
+ }, "strip", z.ZodTypeAny, {
398
+ javascript: string;
399
+ }, {
400
+ javascript: string;
401
+ }>;
402
+ export type BrowserConsoleExecInput = z.infer<typeof BrowserConsoleExecInput>;
403
+ export declare const BrowserConsoleExecOutput: z.ZodObject<{
404
+ result_json: z.ZodString;
405
+ }, "strip", z.ZodTypeAny, {
406
+ result_json: string;
407
+ }, {
408
+ result_json: string;
409
+ }>;
410
+ export type BrowserConsoleExecOutput = z.infer<typeof BrowserConsoleExecOutput>;
411
+ export declare const BrowserConsoleViewInput: z.ZodObject<{
412
+ max_lines: z.ZodOptional<z.ZodNumber>;
413
+ }, "strip", z.ZodTypeAny, {
414
+ max_lines?: number | undefined;
415
+ }, {
416
+ max_lines?: number | undefined;
417
+ }>;
418
+ export type BrowserConsoleViewInput = z.infer<typeof BrowserConsoleViewInput>;
419
+ export declare const BrowserConsoleMessage: z.ZodObject<{
420
+ type: z.ZodString;
421
+ text: z.ZodString;
422
+ timestamp: z.ZodNumber;
423
+ }, "strip", z.ZodTypeAny, {
424
+ type: string;
425
+ text: string;
426
+ timestamp: number;
427
+ }, {
428
+ type: string;
429
+ text: string;
430
+ timestamp: number;
431
+ }>;
432
+ export type BrowserConsoleMessage = z.infer<typeof BrowserConsoleMessage>;
433
+ export declare const BrowserConsoleViewOutput: z.ZodObject<{
434
+ messages: z.ZodArray<z.ZodObject<{
435
+ type: z.ZodString;
436
+ text: z.ZodString;
437
+ timestamp: z.ZodNumber;
438
+ }, "strip", z.ZodTypeAny, {
439
+ type: string;
440
+ text: string;
441
+ timestamp: number;
442
+ }, {
443
+ type: string;
444
+ text: string;
445
+ timestamp: number;
446
+ }>, "many">;
447
+ }, "strip", z.ZodTypeAny, {
448
+ messages: {
449
+ type: string;
450
+ text: string;
451
+ timestamp: number;
452
+ }[];
453
+ }, {
454
+ messages: {
455
+ type: string;
456
+ text: string;
457
+ timestamp: number;
458
+ }[];
459
+ }>;
460
+ export type BrowserConsoleViewOutput = z.infer<typeof BrowserConsoleViewOutput>;
461
+ /**
462
+ * Capture generated media (image/video/audio) from the current page into bytes.
463
+ *
464
+ * Three addressing modes, in priority order:
465
+ * - index: an element from the most recent browser_view (a <video>/<audio>/
466
+ * <img> whose currentSrc/src points at the media)
467
+ * - resource_url: a network resource URL the page already fetched; the host
468
+ * attempts Network.getResponseBody for a tracked requestId first
469
+ * - url: an arbitrary absolute (or blob:) URL to fetch from inside the page
470
+ *
471
+ * At least one of index / url / resource_url must be provided. `media_type`
472
+ * is an optional hint ("image" | "video" | "audio") that biases element
473
+ * resolution and the inferred MIME when the source doesn't declare one.
474
+ */
475
+ export declare const BrowserCaptureMediaInput: z.ZodEffects<z.ZodObject<{
476
+ index: z.ZodOptional<z.ZodNumber>;
477
+ url: z.ZodOptional<z.ZodString>;
478
+ resource_url: z.ZodOptional<z.ZodString>;
479
+ media_type: z.ZodOptional<z.ZodEnum<["image", "video", "audio"]>>;
480
+ }, "strip", z.ZodTypeAny, {
481
+ index?: number | undefined;
482
+ url?: string | undefined;
483
+ resource_url?: string | undefined;
484
+ media_type?: "audio" | "image" | "video" | undefined;
485
+ }, {
486
+ index?: number | undefined;
487
+ url?: string | undefined;
488
+ resource_url?: string | undefined;
489
+ media_type?: "audio" | "image" | "video" | undefined;
490
+ }>, {
491
+ index?: number | undefined;
492
+ url?: string | undefined;
493
+ resource_url?: string | undefined;
494
+ media_type?: "audio" | "image" | "video" | undefined;
495
+ }, {
496
+ index?: number | undefined;
497
+ url?: string | undefined;
498
+ resource_url?: string | undefined;
499
+ media_type?: "audio" | "image" | "video" | undefined;
500
+ }>;
501
+ export type BrowserCaptureMediaInput = z.infer<typeof BrowserCaptureMediaInput>;
502
+ /**
503
+ * Raw capture result from the action. Carries the bytes as base64 plus the
504
+ * resolved MIME and source URL. The host-side tool wrapper persists these
505
+ * bytes via the same `persistOutput` path screenshots use and replaces this
506
+ * shape with a {@link BrowserCaptureMediaOutput} AssetRef.
507
+ */
508
+ export declare const BrowserCaptureMediaRaw: z.ZodObject<{
509
+ /** Base64-encoded media bytes. */
510
+ media_b64: z.ZodString;
511
+ /** Resolved MIME type of the captured bytes. */
512
+ mime_type: z.ZodString;
513
+ /** The URL the bytes were read from (`blob:`/`http(s):`/element currentSrc). */
514
+ source_url: z.ZodNullable<z.ZodString>;
515
+ /** Which rung of the capture ladder produced the bytes. */
516
+ via: z.ZodEnum<["response_body", "in_page_fetch", "downloads"]>;
517
+ }, "strip", z.ZodTypeAny, {
518
+ media_b64: string;
519
+ mime_type: string;
520
+ source_url: string | null;
521
+ via: "downloads" | "in_page_fetch" | "response_body";
522
+ }, {
523
+ media_b64: string;
524
+ mime_type: string;
525
+ source_url: string | null;
526
+ via: "downloads" | "in_page_fetch" | "response_body";
527
+ }>;
528
+ export type BrowserCaptureMediaRaw = z.infer<typeof BrowserCaptureMediaRaw>;
529
+ /**
530
+ * AssetRef-shaped capture output returned to the agent. Mirrors the `screenshot`
531
+ * ref produced by browser_view: a persisted asset with `asset_id`/`asset_uri`
532
+ * (when the context exposes `createAsset`) or a workspace file `path`.
533
+ */
534
+ export declare const BrowserCaptureMediaOutput: z.ZodObject<{
535
+ type: z.ZodEnum<["image", "video", "audio"]>;
536
+ asset_id: z.ZodOptional<z.ZodString>;
537
+ asset_uri: z.ZodOptional<z.ZodString>;
538
+ uri: z.ZodNullable<z.ZodString>;
539
+ path: z.ZodOptional<z.ZodString>;
540
+ mime_type: z.ZodString;
541
+ bytes: z.ZodNumber;
542
+ source_url: z.ZodNullable<z.ZodString>;
543
+ }, "strip", z.ZodTypeAny, {
544
+ type: "audio" | "image" | "video";
545
+ asset_id?: string | undefined;
546
+ asset_uri?: string | undefined;
547
+ uri: string | null;
548
+ path?: string | undefined;
549
+ mime_type: string;
550
+ bytes: number;
551
+ source_url: string | null;
552
+ }, {
553
+ type: "audio" | "image" | "video";
554
+ asset_id?: string | undefined;
555
+ asset_uri?: string | undefined;
556
+ uri: string | null;
557
+ path?: string | undefined;
558
+ mime_type: string;
559
+ bytes: number;
560
+ source_url: string | null;
561
+ }>;
562
+ export type BrowserCaptureMediaOutput = z.infer<typeof BrowserCaptureMediaOutput>;
563
+ /**
564
+ * Inject an existing NodeTool asset into a page `<input type="file">`.
565
+ *
566
+ * The agent addresses the file input the same way every other element action
567
+ * does (index from the most recent browser_view, or viewport coordinates) and
568
+ * names the asset to inject by `asset_id` or `uri`. `file_name` overrides the
569
+ * name the website sees; otherwise it is derived from the asset.
570
+ *
571
+ * The agent-facing shape carries only the asset handle — the host-side tool
572
+ * wrapper resolves the bytes (via the same asset-read path other nodes use) and
573
+ * forwards a {@link BrowserUploadAssetRaw} to the action. At least one of
574
+ * asset_id / uri, and at least one of index / (coordinate_x, coordinate_y),
575
+ * must be provided.
576
+ */
577
+ export declare const BrowserUploadAssetInput: z.ZodEffects<z.ZodEffects<z.ZodObject<{
578
+ index: z.ZodOptional<z.ZodNumber>;
579
+ coordinate_x: z.ZodOptional<z.ZodNumber>;
580
+ coordinate_y: z.ZodOptional<z.ZodNumber>;
581
+ asset_id: z.ZodOptional<z.ZodString>;
582
+ uri: z.ZodOptional<z.ZodString>;
583
+ file_name: z.ZodOptional<z.ZodString>;
584
+ }, "strip", z.ZodTypeAny, {
585
+ index?: number | undefined;
586
+ coordinate_x?: number | undefined;
587
+ coordinate_y?: number | undefined;
588
+ asset_id?: string | undefined;
589
+ uri?: string | undefined;
590
+ file_name?: string | undefined;
591
+ }, {
592
+ index?: number | undefined;
593
+ coordinate_x?: number | undefined;
594
+ coordinate_y?: number | undefined;
595
+ asset_id?: string | undefined;
596
+ uri?: string | undefined;
597
+ file_name?: string | undefined;
598
+ }>, {
599
+ index?: number | undefined;
600
+ coordinate_x?: number | undefined;
601
+ coordinate_y?: number | undefined;
602
+ asset_id?: string | undefined;
603
+ uri?: string | undefined;
604
+ file_name?: string | undefined;
605
+ }, {
606
+ index?: number | undefined;
607
+ coordinate_x?: number | undefined;
608
+ coordinate_y?: number | undefined;
609
+ asset_id?: string | undefined;
610
+ uri?: string | undefined;
611
+ file_name?: string | undefined;
612
+ }>, {
613
+ index?: number | undefined;
614
+ coordinate_x?: number | undefined;
615
+ coordinate_y?: number | undefined;
616
+ asset_id?: string | undefined;
617
+ uri?: string | undefined;
618
+ file_name?: string | undefined;
619
+ }, {
620
+ index?: number | undefined;
621
+ coordinate_x?: number | undefined;
622
+ coordinate_y?: number | undefined;
623
+ asset_id?: string | undefined;
624
+ uri?: string | undefined;
625
+ file_name?: string | undefined;
626
+ }>;
627
+ export type BrowserUploadAssetInput = z.infer<typeof BrowserUploadAssetInput>;
628
+ /**
629
+ * The wire input the upload_asset action actually consumes: the file input's
630
+ * {@link ElementRef} plus the asset bytes resolved host-side (base64), the file
631
+ * name the website should see, and the MIME type. The host tool wrapper builds
632
+ * this from a {@link BrowserUploadAssetInput} after reading the asset.
633
+ */
634
+ export declare const BrowserUploadAssetRaw: z.ZodEffects<z.ZodObject<{
635
+ index: z.ZodOptional<z.ZodNumber>;
636
+ coordinate_x: z.ZodOptional<z.ZodNumber>;
637
+ coordinate_y: z.ZodOptional<z.ZodNumber>;
638
+ /** Base64-encoded file bytes. */
639
+ file_b64: z.ZodString;
640
+ /** File name the website sees on the injected File. */
641
+ file_name: z.ZodString;
642
+ /** MIME type stamped on the injected File. */
643
+ mime_type: z.ZodString;
644
+ }, "strip", z.ZodTypeAny, {
645
+ index?: number | undefined;
646
+ coordinate_x?: number | undefined;
647
+ coordinate_y?: number | undefined;
648
+ file_b64: string;
649
+ file_name: string;
650
+ mime_type: string;
651
+ }, {
652
+ index?: number | undefined;
653
+ coordinate_x?: number | undefined;
654
+ coordinate_y?: number | undefined;
655
+ file_b64: string;
656
+ file_name: string;
657
+ mime_type: string;
658
+ }>, {
659
+ index?: number | undefined;
660
+ coordinate_x?: number | undefined;
661
+ coordinate_y?: number | undefined;
662
+ file_b64: string;
663
+ file_name: string;
664
+ mime_type: string;
665
+ }, {
666
+ index?: number | undefined;
667
+ coordinate_x?: number | undefined;
668
+ coordinate_y?: number | undefined;
669
+ file_b64: string;
670
+ file_name: string;
671
+ mime_type: string;
672
+ }>;
673
+ export type BrowserUploadAssetRaw = z.infer<typeof BrowserUploadAssetRaw>;
674
+ /**
675
+ * Result of injecting an asset into a file input. `via` records which path
676
+ * succeeded: `native` is `DOM.setFileInputFiles` against a real filesystem path
677
+ * Chrome can reach; `data_transfer` is the in-page DataTransfer/`File`
678
+ * fallback used when no path is reachable (e.g. the extension driving the
679
+ * user's own machine from the server).
680
+ */
681
+ export declare const BrowserUploadAssetOutput: z.ZodObject<{
682
+ uploaded: z.ZodLiteral<true>;
683
+ file_name: z.ZodString;
684
+ bytes: z.ZodNumber;
685
+ via: z.ZodEnum<["native", "data_transfer"]>;
686
+ }, "strip", z.ZodTypeAny, {
687
+ uploaded: true;
688
+ file_name: string;
689
+ bytes: number;
690
+ via: "data_transfer" | "native";
691
+ }, {
692
+ uploaded: true;
693
+ file_name: string;
694
+ bytes: number;
695
+ via: "data_transfer" | "native";
696
+ }>;
697
+ export type BrowserUploadAssetOutput = z.infer<typeof BrowserUploadAssetOutput>;
698
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/sch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