@sdods/mcp 0.3.2 → 0.5.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.
@@ -0,0 +1,254 @@
1
+ import { z } from 'zod';
2
+ /** Upstream argument shapes, one per Playwright MCP tool. `sessionId` is added by the wrapper. */
3
+ export declare const UPSTREAM_SHAPES: {
4
+ readonly browser_annotate: {};
5
+ readonly browser_click: {
6
+ readonly element: z.ZodOptional<z.ZodString>;
7
+ readonly target: z.ZodString;
8
+ readonly doubleClick: z.ZodOptional<z.ZodBoolean>;
9
+ readonly button: z.ZodOptional<z.ZodEnum<{
10
+ left: "left";
11
+ right: "right";
12
+ middle: "middle";
13
+ }>>;
14
+ readonly modifiers: z.ZodOptional<z.ZodArray<z.ZodEnum<{
15
+ Alt: "Alt";
16
+ Control: "Control";
17
+ ControlOrMeta: "ControlOrMeta";
18
+ Meta: "Meta";
19
+ Shift: "Shift";
20
+ }>>>;
21
+ };
22
+ readonly browser_close: {};
23
+ readonly browser_console_messages: {
24
+ readonly level: z.ZodOptional<z.ZodEnum<{
25
+ error: "error";
26
+ info: "info";
27
+ warning: "warning";
28
+ debug: "debug";
29
+ }>>;
30
+ readonly all: z.ZodOptional<z.ZodBoolean>;
31
+ readonly filename: z.ZodOptional<z.ZodString>;
32
+ };
33
+ readonly browser_drag: {
34
+ readonly startElement: z.ZodOptional<z.ZodString>;
35
+ readonly startTarget: z.ZodString;
36
+ readonly endElement: z.ZodOptional<z.ZodString>;
37
+ readonly endTarget: z.ZodString;
38
+ };
39
+ readonly browser_drop: {
40
+ readonly element: z.ZodOptional<z.ZodString>;
41
+ readonly target: z.ZodString;
42
+ readonly paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
43
+ readonly data: z.ZodOptional<z.ZodString>;
44
+ };
45
+ readonly browser_evaluate: {
46
+ readonly element: z.ZodOptional<z.ZodString>;
47
+ readonly target: z.ZodOptional<z.ZodString>;
48
+ readonly function: z.ZodString;
49
+ readonly filename: z.ZodOptional<z.ZodString>;
50
+ };
51
+ readonly browser_file_upload: {
52
+ readonly paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
53
+ };
54
+ readonly browser_fill_form: {
55
+ readonly fields: z.ZodArray<z.ZodObject<{
56
+ element: z.ZodOptional<z.ZodString>;
57
+ target: z.ZodString;
58
+ name: z.ZodString;
59
+ type: z.ZodEnum<{
60
+ textbox: "textbox";
61
+ checkbox: "checkbox";
62
+ radio: "radio";
63
+ combobox: "combobox";
64
+ slider: "slider";
65
+ }>;
66
+ value: z.ZodString;
67
+ }, z.core.$strip>>;
68
+ };
69
+ readonly browser_find: {
70
+ readonly text: z.ZodOptional<z.ZodString>;
71
+ readonly regex: z.ZodOptional<z.ZodString>;
72
+ };
73
+ readonly browser_handle_dialog: {
74
+ readonly accept: z.ZodBoolean;
75
+ readonly promptText: z.ZodOptional<z.ZodString>;
76
+ };
77
+ readonly browser_hide_highlight: {
78
+ readonly element: z.ZodOptional<z.ZodString>;
79
+ readonly target: z.ZodOptional<z.ZodString>;
80
+ };
81
+ readonly browser_highlight: {
82
+ readonly element: z.ZodOptional<z.ZodString>;
83
+ readonly target: z.ZodString;
84
+ readonly style: z.ZodOptional<z.ZodString>;
85
+ };
86
+ readonly browser_hover: {
87
+ readonly element: z.ZodOptional<z.ZodString>;
88
+ readonly target: z.ZodString;
89
+ };
90
+ readonly browser_mouse_click_xy: {
91
+ readonly x: z.ZodNumber;
92
+ readonly y: z.ZodNumber;
93
+ readonly button: z.ZodOptional<z.ZodEnum<{
94
+ left: "left";
95
+ right: "right";
96
+ middle: "middle";
97
+ }>>;
98
+ readonly clickCount: z.ZodOptional<z.ZodNumber>;
99
+ readonly delay: z.ZodOptional<z.ZodNumber>;
100
+ };
101
+ readonly browser_mouse_down: {
102
+ readonly button: z.ZodOptional<z.ZodEnum<{
103
+ left: "left";
104
+ right: "right";
105
+ middle: "middle";
106
+ }>>;
107
+ };
108
+ readonly browser_mouse_drag_xy: {
109
+ readonly startX: z.ZodNumber;
110
+ readonly startY: z.ZodNumber;
111
+ readonly endX: z.ZodNumber;
112
+ readonly endY: z.ZodNumber;
113
+ };
114
+ readonly browser_mouse_move_xy: {
115
+ readonly x: z.ZodNumber;
116
+ readonly y: z.ZodNumber;
117
+ };
118
+ readonly browser_mouse_up: {
119
+ readonly button: z.ZodOptional<z.ZodEnum<{
120
+ left: "left";
121
+ right: "right";
122
+ middle: "middle";
123
+ }>>;
124
+ };
125
+ readonly browser_mouse_wheel: {
126
+ readonly deltaX: z.ZodOptional<z.ZodNumber>;
127
+ readonly deltaY: z.ZodOptional<z.ZodNumber>;
128
+ };
129
+ readonly browser_navigate: {
130
+ readonly url: z.ZodString;
131
+ };
132
+ readonly browser_navigate_back: {};
133
+ readonly browser_network_request: {
134
+ readonly index: z.ZodNumber;
135
+ readonly part: z.ZodOptional<z.ZodEnum<{
136
+ "request-headers": "request-headers";
137
+ "request-body": "request-body";
138
+ "response-headers": "response-headers";
139
+ "response-body": "response-body";
140
+ }>>;
141
+ readonly filename: z.ZodOptional<z.ZodString>;
142
+ };
143
+ readonly browser_network_requests: {
144
+ readonly static: z.ZodOptional<z.ZodBoolean>;
145
+ readonly filter: z.ZodOptional<z.ZodString>;
146
+ readonly filename: z.ZodOptional<z.ZodString>;
147
+ };
148
+ readonly browser_pdf_save: {
149
+ readonly filename: z.ZodOptional<z.ZodString>;
150
+ };
151
+ readonly browser_press_key: {
152
+ readonly key: z.ZodString;
153
+ };
154
+ readonly browser_resize: {
155
+ readonly width: z.ZodNumber;
156
+ readonly height: z.ZodNumber;
157
+ };
158
+ readonly browser_resume: {
159
+ readonly step: z.ZodOptional<z.ZodBoolean>;
160
+ readonly location: z.ZodOptional<z.ZodString>;
161
+ };
162
+ readonly browser_run_code_unsafe: {
163
+ readonly code: z.ZodOptional<z.ZodString>;
164
+ readonly filename: z.ZodOptional<z.ZodString>;
165
+ };
166
+ readonly browser_select_option: {
167
+ readonly element: z.ZodOptional<z.ZodString>;
168
+ readonly target: z.ZodString;
169
+ readonly values: z.ZodArray<z.ZodString>;
170
+ };
171
+ readonly browser_snapshot: {
172
+ readonly target: z.ZodOptional<z.ZodString>;
173
+ readonly filename: z.ZodOptional<z.ZodString>;
174
+ readonly depth: z.ZodOptional<z.ZodNumber>;
175
+ readonly boxes: z.ZodOptional<z.ZodBoolean>;
176
+ };
177
+ readonly browser_start_recording: {};
178
+ readonly browser_start_tracing: {};
179
+ readonly browser_start_video: {
180
+ readonly filename: z.ZodOptional<z.ZodString>;
181
+ readonly size: z.ZodOptional<z.ZodObject<{
182
+ width: z.ZodNumber;
183
+ height: z.ZodNumber;
184
+ }, z.core.$strip>>;
185
+ };
186
+ readonly browser_stop_recording: {};
187
+ readonly browser_stop_tracing: {};
188
+ readonly browser_stop_video: {};
189
+ readonly browser_tabs: {
190
+ readonly action: z.ZodEnum<{
191
+ close: "close";
192
+ list: "list";
193
+ new: "new";
194
+ select: "select";
195
+ }>;
196
+ readonly index: z.ZodOptional<z.ZodNumber>;
197
+ readonly url: z.ZodOptional<z.ZodString>;
198
+ };
199
+ readonly browser_take_screenshot: {
200
+ readonly element: z.ZodOptional<z.ZodString>;
201
+ readonly target: z.ZodOptional<z.ZodString>;
202
+ readonly type: z.ZodOptional<z.ZodEnum<{
203
+ png: "png";
204
+ jpeg: "jpeg";
205
+ webp: "webp";
206
+ }>>;
207
+ readonly filename: z.ZodOptional<z.ZodString>;
208
+ readonly fullPage: z.ZodOptional<z.ZodBoolean>;
209
+ readonly scale: z.ZodOptional<z.ZodEnum<{
210
+ css: "css";
211
+ device: "device";
212
+ }>>;
213
+ };
214
+ readonly browser_type: {
215
+ readonly element: z.ZodOptional<z.ZodString>;
216
+ readonly target: z.ZodString;
217
+ readonly text: z.ZodString;
218
+ readonly submit: z.ZodOptional<z.ZodBoolean>;
219
+ readonly slowly: z.ZodOptional<z.ZodBoolean>;
220
+ };
221
+ readonly browser_video_chapter: {
222
+ readonly title: z.ZodString;
223
+ readonly description: z.ZodOptional<z.ZodString>;
224
+ readonly duration: z.ZodOptional<z.ZodNumber>;
225
+ };
226
+ readonly browser_video_hide_actions: {};
227
+ readonly browser_video_show_actions: {
228
+ readonly duration: z.ZodOptional<z.ZodNumber>;
229
+ readonly position: z.ZodOptional<z.ZodEnum<{
230
+ "top-left": "top-left";
231
+ top: "top";
232
+ "top-right": "top-right";
233
+ "bottom-left": "bottom-left";
234
+ bottom: "bottom";
235
+ "bottom-right": "bottom-right";
236
+ }>>;
237
+ readonly cursor: z.ZodOptional<z.ZodEnum<{
238
+ none: "none";
239
+ pointer: "pointer";
240
+ }>>;
241
+ };
242
+ readonly browser_wait_for: {
243
+ readonly time: z.ZodOptional<z.ZodNumber>;
244
+ readonly text: z.ZodOptional<z.ZodString>;
245
+ readonly textGone: z.ZodOptional<z.ZodString>;
246
+ };
247
+ };
248
+ export type UpstreamToolName = keyof typeof UPSTREAM_SHAPES;
249
+ /**
250
+ * Properties upstream marks required while giving them a default. They are optional on the SDODS
251
+ * side; the driver merges these back in before the call so the wire request is unchanged.
252
+ */
253
+ export declare const UPSTREAM_DEFAULTS: Partial<Record<UpstreamToolName, Record<string, unknown>>>;
254
+ //# sourceMappingURL=shapes.d.ts.map
@@ -0,0 +1,416 @@
1
+ // GENERATED by scripts/gen-browser-shapes.ts from
2
+ // packages/mcp/test/fixtures/playwright-mcp-tools.json (Playwright 1.63.0).
3
+ // Do not edit by hand: `bun run mcp:browser-shapes` rewrites it, and
4
+ // packages/mcp/test/browser-schemas.test.ts fails if it drifts from the dump.
5
+ import { z } from 'zod';
6
+ /** Upstream argument shapes, one per Playwright MCP tool. `sessionId` is added by the wrapper. */
7
+ export const UPSTREAM_SHAPES = {
8
+ browser_annotate: {},
9
+ browser_click: {
10
+ element: z
11
+ .string()
12
+ .describe('Human-readable element description used to obtain permission to interact with the element')
13
+ .optional(),
14
+ target: z
15
+ .string()
16
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
17
+ doubleClick: z
18
+ .boolean()
19
+ .describe('Whether to perform a double click instead of a single click')
20
+ .optional(),
21
+ button: z
22
+ .enum(['left', 'right', 'middle'])
23
+ .describe('Button to click, defaults to left')
24
+ .optional(),
25
+ modifiers: z
26
+ .array(z.enum(['Alt', 'Control', 'ControlOrMeta', 'Meta', 'Shift']))
27
+ .describe('Modifier keys to press')
28
+ .optional(),
29
+ },
30
+ browser_close: {},
31
+ browser_console_messages: {
32
+ level: z
33
+ .enum(['error', 'warning', 'info', 'debug'])
34
+ .describe('Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".')
35
+ .optional(),
36
+ all: z
37
+ .boolean()
38
+ .describe('Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.')
39
+ .optional(),
40
+ filename: z
41
+ .string()
42
+ .describe('File name to save the console messages to. Relative file names are resolved against the workspace root. If not provided, messages are returned as text.')
43
+ .optional(),
44
+ },
45
+ browser_drag: {
46
+ startElement: z
47
+ .string()
48
+ .describe('Human-readable source element description used to obtain the permission to interact with the element')
49
+ .optional(),
50
+ startTarget: z
51
+ .string()
52
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
53
+ endElement: z
54
+ .string()
55
+ .describe('Human-readable target element description used to obtain the permission to interact with the element')
56
+ .optional(),
57
+ endTarget: z
58
+ .string()
59
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
60
+ },
61
+ browser_drop: {
62
+ element: z
63
+ .string()
64
+ .describe('Human-readable element description used to obtain permission to interact with the element')
65
+ .optional(),
66
+ target: z
67
+ .string()
68
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
69
+ paths: z
70
+ .array(z.string())
71
+ .describe('Absolute paths to files to drop onto the element.')
72
+ .optional(),
73
+ data: z
74
+ .string()
75
+ .describe('Data to drop, as a map of MIME type to string value (e.g. {"text/plain": "hello", "text/uri-list": "https://example.com"}).')
76
+ .optional(),
77
+ },
78
+ browser_evaluate: {
79
+ element: z
80
+ .string()
81
+ .describe('Human-readable element description used to obtain permission to interact with the element')
82
+ .optional(),
83
+ target: z
84
+ .string()
85
+ .describe('Exact target element reference from the page snapshot, or a unique element selector')
86
+ .optional(),
87
+ function: z
88
+ .string()
89
+ .describe('() => { /* code */ } or (element) => { /* code */ } when element is provided'),
90
+ filename: z
91
+ .string()
92
+ .describe('File name to save the result to. Relative file names are resolved against the workspace root. If not provided, result is returned as text.')
93
+ .optional(),
94
+ },
95
+ browser_file_upload: {
96
+ paths: z
97
+ .array(z.string())
98
+ .describe('The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled.')
99
+ .optional(),
100
+ },
101
+ browser_fill_form: {
102
+ fields: z
103
+ .array(z.object({
104
+ element: z
105
+ .string()
106
+ .describe('Human-readable element description used to obtain permission to interact with the element')
107
+ .optional(),
108
+ target: z
109
+ .string()
110
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
111
+ name: z.string().describe('Human-readable field name'),
112
+ type: z
113
+ .enum(['textbox', 'checkbox', 'radio', 'combobox', 'slider'])
114
+ .describe('Type of the field'),
115
+ value: z
116
+ .string()
117
+ .describe('Value to fill in the field. If the field is a checkbox, the value should be `true` or `false`. If the field is a combobox, the value should be the text of the option.'),
118
+ }))
119
+ .describe('Fields to fill in'),
120
+ },
121
+ browser_find: {
122
+ text: z
123
+ .string()
124
+ .describe('Plain text to search for in the page snapshot (case-insensitive substring match). Provide either text or regex, not both.')
125
+ .optional(),
126
+ regex: z
127
+ .string()
128
+ .describe('Regular expression to search for in the page snapshot. Matching is case-sensitive by default; wrap the pattern in slashes to add flags, e.g. "/error/i" for case-insensitive. Provide either text or regex, not both.')
129
+ .optional(),
130
+ },
131
+ browser_handle_dialog: {
132
+ accept: z.boolean().describe('Whether to accept the dialog.'),
133
+ promptText: z
134
+ .string()
135
+ .describe('The text of the prompt in case of a prompt dialog.')
136
+ .optional(),
137
+ },
138
+ browser_hide_highlight: {
139
+ element: z
140
+ .string()
141
+ .describe('Human-readable element description used when adding the highlight; must match the value passed to browser_highlight.')
142
+ .optional(),
143
+ target: z
144
+ .string()
145
+ .describe('Exact target element reference from the page snapshot, or a unique element selector')
146
+ .optional(),
147
+ },
148
+ browser_highlight: {
149
+ element: z
150
+ .string()
151
+ .describe('Human-readable element description used to obtain permission to interact with the element')
152
+ .optional(),
153
+ target: z
154
+ .string()
155
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
156
+ style: z
157
+ .string()
158
+ .describe('Additional inline CSS applied to the highlight overlay, e.g. "outline: 2px dashed red".')
159
+ .optional(),
160
+ },
161
+ browser_hover: {
162
+ element: z
163
+ .string()
164
+ .describe('Human-readable element description used to obtain permission to interact with the element')
165
+ .optional(),
166
+ target: z
167
+ .string()
168
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
169
+ },
170
+ browser_mouse_click_xy: {
171
+ x: z.number().describe('X coordinate'),
172
+ y: z.number().describe('Y coordinate'),
173
+ button: z
174
+ .enum(['left', 'right', 'middle'])
175
+ .describe('Button to click, defaults to left')
176
+ .optional(),
177
+ clickCount: z.number().describe('Number of clicks, defaults to 1').optional(),
178
+ delay: z
179
+ .number()
180
+ .describe('Time to wait between mouse down and mouse up in milliseconds, defaults to 0')
181
+ .optional(),
182
+ },
183
+ browser_mouse_down: {
184
+ button: z
185
+ .enum(['left', 'right', 'middle'])
186
+ .describe('Button to press, defaults to left')
187
+ .optional(),
188
+ },
189
+ browser_mouse_drag_xy: {
190
+ startX: z.number().describe('Start X coordinate'),
191
+ startY: z.number().describe('Start Y coordinate'),
192
+ endX: z.number().describe('End X coordinate'),
193
+ endY: z.number().describe('End Y coordinate'),
194
+ },
195
+ browser_mouse_move_xy: {
196
+ x: z.number().describe('X coordinate'),
197
+ y: z.number().describe('Y coordinate'),
198
+ },
199
+ browser_mouse_up: {
200
+ button: z
201
+ .enum(['left', 'right', 'middle'])
202
+ .describe('Button to press, defaults to left')
203
+ .optional(),
204
+ },
205
+ browser_mouse_wheel: {
206
+ deltaX: z.number().describe('X delta').optional(),
207
+ deltaY: z.number().describe('Y delta').optional(),
208
+ },
209
+ browser_navigate: {
210
+ url: z.string().describe('The URL to navigate to'),
211
+ },
212
+ browser_navigate_back: {},
213
+ browser_network_request: {
214
+ index: z
215
+ .number()
216
+ .int()
217
+ .min(1)
218
+ .describe('1-based index of the request, as printed by browser_network_requests.'),
219
+ part: z
220
+ .enum(['request-headers', 'request-body', 'response-headers', 'response-body'])
221
+ .describe('Return only this part of the request. Omit to return full details.')
222
+ .optional(),
223
+ filename: z
224
+ .string()
225
+ .describe('File name to save the result to. Relative file names are resolved against the workspace root. If not provided, output is returned as text.')
226
+ .optional(),
227
+ },
228
+ browser_network_requests: {
229
+ static: z
230
+ .boolean()
231
+ .describe('Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false.')
232
+ .optional(),
233
+ filter: z
234
+ .string()
235
+ .describe('Only return requests whose URL matches this regexp (e.g. "/api/.*user").')
236
+ .optional(),
237
+ filename: z
238
+ .string()
239
+ .describe('File name to save the network requests to. Relative file names are resolved against the workspace root. If not provided, requests are returned as text.')
240
+ .optional(),
241
+ },
242
+ browser_pdf_save: {
243
+ filename: z
244
+ .string()
245
+ .describe('File name to save the pdf to. Relative file names are resolved against the workspace root. If not specified, the pdf is saved into the output directory as `page-{timestamp}.pdf`.')
246
+ .optional(),
247
+ },
248
+ browser_press_key: {
249
+ key: z
250
+ .string()
251
+ .describe('Name of the key to press or a character to generate, such as `ArrowLeft` or `a`'),
252
+ },
253
+ browser_resize: {
254
+ width: z.number().describe('Width of the browser window'),
255
+ height: z.number().describe('Height of the browser window'),
256
+ },
257
+ browser_resume: {
258
+ step: z
259
+ .boolean()
260
+ .describe('When true, execution will pause again before the next action, allowing step-by-step debugging.')
261
+ .optional(),
262
+ location: z
263
+ .string()
264
+ .describe('Pause execution at a specific <file>:<line>, e.g. "example.spec.ts:42".')
265
+ .optional(),
266
+ },
267
+ browser_run_code_unsafe: {
268
+ code: z
269
+ .string()
270
+ .describe("A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: `async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); }`")
271
+ .optional(),
272
+ filename: z
273
+ .string()
274
+ .describe('Load code from the specified file. Relative file names are resolved against the workspace root. If both code and filename are provided, code will be ignored.')
275
+ .optional(),
276
+ },
277
+ browser_select_option: {
278
+ element: z
279
+ .string()
280
+ .describe('Human-readable element description used to obtain permission to interact with the element')
281
+ .optional(),
282
+ target: z
283
+ .string()
284
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
285
+ values: z
286
+ .array(z.string())
287
+ .describe('Array of values to select in the dropdown. This can be a single value or multiple values.'),
288
+ },
289
+ browser_snapshot: {
290
+ target: z
291
+ .string()
292
+ .describe('Exact target element reference from the page snapshot, or a unique element selector')
293
+ .optional(),
294
+ filename: z
295
+ .string()
296
+ .describe('Save snapshot to a file instead of returning it in the response. Relative file names are resolved against the workspace root.')
297
+ .optional(),
298
+ depth: z.number().describe('Limit the depth of the snapshot tree').optional(),
299
+ boxes: z
300
+ .boolean()
301
+ .describe("Include each element's bounding box as [box=x,y,width,height] in the snapshot. Coordinates are viewport-relative, in CSS pixels (Element.getBoundingClientRect)")
302
+ .optional(),
303
+ },
304
+ browser_start_recording: {},
305
+ browser_start_tracing: {},
306
+ browser_start_video: {
307
+ filename: z
308
+ .string()
309
+ .describe('File name to save the video to. Relative file names are resolved against the workspace root. If not specified, the video is saved into the output directory as `video-{timestamp}.webm`.')
310
+ .optional(),
311
+ size: z
312
+ .object({
313
+ width: z.number().describe('Video width'),
314
+ height: z.number().describe('Video height'),
315
+ })
316
+ .describe('Video size')
317
+ .optional(),
318
+ },
319
+ browser_stop_recording: {},
320
+ browser_stop_tracing: {},
321
+ browser_stop_video: {},
322
+ browser_tabs: {
323
+ action: z.enum(['list', 'new', 'close', 'select']).describe('Operation to perform'),
324
+ index: z
325
+ .number()
326
+ .describe('Tab index, used for close/select. If omitted for close, current tab is closed.')
327
+ .optional(),
328
+ url: z.string().describe('URL to navigate to in the new tab, used for new.').optional(),
329
+ },
330
+ browser_take_screenshot: {
331
+ element: z
332
+ .string()
333
+ .describe('Human-readable element description used to obtain permission to interact with the element')
334
+ .optional(),
335
+ target: z
336
+ .string()
337
+ .describe('Exact target element reference from the page snapshot, or a unique element selector')
338
+ .optional(),
339
+ type: z
340
+ .enum(['png', 'jpeg', 'webp'])
341
+ .describe('Image format for the screenshot. If unset, inferred from the filename extension, otherwise png.')
342
+ .optional(),
343
+ filename: z
344
+ .string()
345
+ .describe('File name to save the screenshot to. Relative file names are resolved against the workspace root. If not specified, the screenshot is saved into the output directory as `page-{timestamp}.{png|jpeg|webp}`.')
346
+ .optional(),
347
+ fullPage: z
348
+ .boolean()
349
+ .describe('When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.')
350
+ .optional(),
351
+ scale: z
352
+ .enum(['css', 'device'])
353
+ .describe('Image resolution scale. "css" produces a screenshot sized in CSS pixels (smaller, consistent across devices). "device" produces a high-resolution screenshot using device pixels (larger, accounts for the device pixel ratio). Default is css.')
354
+ .optional(),
355
+ },
356
+ browser_type: {
357
+ element: z
358
+ .string()
359
+ .describe('Human-readable element description used to obtain permission to interact with the element')
360
+ .optional(),
361
+ target: z
362
+ .string()
363
+ .describe('Exact target element reference from the page snapshot, or a unique element selector'),
364
+ text: z.string().describe('Text to type into the element'),
365
+ submit: z.boolean().describe('Whether to submit entered text (press Enter after)').optional(),
366
+ slowly: z
367
+ .boolean()
368
+ .describe('Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.')
369
+ .optional(),
370
+ },
371
+ browser_video_chapter: {
372
+ title: z.string().describe('Chapter title'),
373
+ description: z.string().describe('Chapter description').optional(),
374
+ duration: z.number().describe('Duration in milliseconds to show the chapter card').optional(),
375
+ },
376
+ browser_video_hide_actions: {},
377
+ browser_video_show_actions: {
378
+ duration: z
379
+ .number()
380
+ .describe('How long each action annotation stays on screen, in milliseconds. Defaults to 500.')
381
+ .optional(),
382
+ position: z
383
+ .enum(['top-left', 'top', 'top-right', 'bottom-left', 'bottom', 'bottom-right'])
384
+ .describe('Where to place the action title relative to the page. Defaults to top-right.')
385
+ .optional(),
386
+ cursor: z
387
+ .enum(['none', 'pointer'])
388
+ .describe('Cursor decoration for pointer actions. "pointer" (default) animates a mouse pointer from the previous action point to the next one; "none" disables the cursor decoration.')
389
+ .optional(),
390
+ },
391
+ browser_wait_for: {
392
+ time: z.number().describe('The time to wait in seconds').optional(),
393
+ text: z.string().describe('The text to wait for').optional(),
394
+ textGone: z.string().describe('The text to wait for to disappear').optional(),
395
+ },
396
+ };
397
+ /**
398
+ * Properties upstream marks required while giving them a default. They are optional on the SDODS
399
+ * side; the driver merges these back in before the call so the wire request is unchanged.
400
+ */
401
+ export const UPSTREAM_DEFAULTS = {
402
+ browser_console_messages: {
403
+ level: 'info',
404
+ },
405
+ browser_mouse_wheel: {
406
+ deltaX: 0,
407
+ deltaY: 0,
408
+ },
409
+ browser_network_requests: {
410
+ static: false,
411
+ },
412
+ browser_take_screenshot: {
413
+ scale: 'css',
414
+ },
415
+ };
416
+ //# sourceMappingURL=shapes.js.map