safari-devtools-mcp 1.2.0 → 1.3.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.
- package/README.md +15 -0
- package/build/src/bin/safari-devtools-mcp.d.ts +7 -0
- package/build/src/bin/safari-devtools-mcp.d.ts.map +1 -1
- package/build/src/bin/safari-devtools-mcp.js +17 -1
- package/build/src/bin/safari-devtools-mcp.js.map +1 -1
- package/build/src/index.d.ts +5 -1
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +33 -80
- package/build/src/index.js.map +1 -1
- package/build/src/tools/console.d.ts +1 -13
- package/build/src/tools/console.d.ts.map +1 -1
- package/build/src/tools/console.js +85 -67
- package/build/src/tools/console.js.map +1 -1
- package/build/src/tools/cookies.d.ts +1 -20
- package/build/src/tools/cookies.d.ts.map +1 -1
- package/build/src/tools/cookies.js +129 -111
- package/build/src/tools/cookies.js.map +1 -1
- package/build/src/tools/css.d.ts +1 -6
- package/build/src/tools/css.d.ts.map +1 -1
- package/build/src/tools/css.js +52 -45
- package/build/src/tools/css.js.map +1 -1
- package/build/src/tools/input.d.ts +1 -63
- package/build/src/tools/input.d.ts.map +1 -1
- package/build/src/tools/input.js +311 -253
- package/build/src/tools/input.js.map +1 -1
- package/build/src/tools/network.d.ts +1 -13
- package/build/src/tools/network.d.ts.map +1 -1
- package/build/src/tools/network.js +85 -67
- package/build/src/tools/network.js.map +1 -1
- package/build/src/tools/page-content.d.ts +1 -11
- package/build/src/tools/page-content.d.ts.map +1 -1
- package/build/src/tools/page-content.js +104 -83
- package/build/src/tools/page-content.js.map +1 -1
- package/build/src/tools/pages.d.ts +1 -30
- package/build/src/tools/pages.d.ts.map +1 -1
- package/build/src/tools/pages.js +244 -202
- package/build/src/tools/pages.js.map +1 -1
- package/build/src/tools/screenshot.d.ts +1 -6
- package/build/src/tools/screenshot.d.ts.map +1 -1
- package/build/src/tools/screenshot.js +73 -65
- package/build/src/tools/screenshot.js.map +1 -1
- package/build/src/tools/script.d.ts +1 -6
- package/build/src/tools/script.d.ts.map +1 -1
- package/build/src/tools/script.js +41 -33
- package/build/src/tools/script.js.map +1 -1
- package/build/src/tools/scroll.d.ts +1 -10
- package/build/src/tools/scroll.d.ts.map +1 -1
- package/build/src/tools/scroll.js +50 -40
- package/build/src/tools/scroll.js.map +1 -1
- package/build/src/tools/snapshot.d.ts +1 -11
- package/build/src/tools/snapshot.d.ts.map +1 -1
- package/build/src/tools/snapshot.js +79 -68
- package/build/src/tools/snapshot.js.map +1 -1
- package/build/src/tools/storage.d.ts +1 -17
- package/build/src/tools/storage.d.ts.map +1 -1
- package/build/src/tools/storage.js +116 -98
- package/build/src/tools/storage.js.map +1 -1
- package/build/src/tools/types.d.ts +11 -1
- package/build/src/tools/types.d.ts.map +1 -1
- package/build/src/tools/types.js +3 -1
- package/build/src/tools/types.js.map +1 -1
- package/package.json +7 -8
package/build/src/tools/input.js
CHANGED
|
@@ -3,257 +3,315 @@
|
|
|
3
3
|
* Mirrors chrome-devtools-mcp tool names: click, hover, fill, fill_form, type_text, drag, press_key, upload_file
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
|
|
7
|
-
export const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}
|
|
6
|
+
import { defineTool } from './types.js';
|
|
7
|
+
export const tools = [
|
|
8
|
+
defineTool({
|
|
9
|
+
name: 'click',
|
|
10
|
+
description: 'Clicks on the provided element.',
|
|
11
|
+
slimDescription: 'Click element.',
|
|
12
|
+
schema: {
|
|
13
|
+
uid: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe('The uid of an element on the page from the page content snapshot'),
|
|
16
|
+
dblClick: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe('Set to true for double clicks. Default is false.'),
|
|
20
|
+
},
|
|
21
|
+
handler: async (params, driver) => {
|
|
22
|
+
try {
|
|
23
|
+
await driver.clickElement(params.uid, params.dblClick);
|
|
24
|
+
return {
|
|
25
|
+
content: [
|
|
26
|
+
{
|
|
27
|
+
type: 'text',
|
|
28
|
+
text: params.dblClick
|
|
29
|
+
? 'Successfully double clicked on the element.'
|
|
30
|
+
: 'Successfully clicked on the element.',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
return {
|
|
37
|
+
content: [
|
|
38
|
+
{
|
|
39
|
+
type: 'text',
|
|
40
|
+
text: `Failed to interact with element uid ${params.uid}: ${error instanceof Error ? error.message : String(error)}`,
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
isError: true,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
}),
|
|
48
|
+
defineTool({
|
|
49
|
+
name: 'click_at',
|
|
50
|
+
description: 'Clicks at the provided coordinates.',
|
|
51
|
+
slimDescription: 'Click at coordinates.',
|
|
52
|
+
schema: {
|
|
53
|
+
x: z.number().describe('The x coordinate'),
|
|
54
|
+
y: z.number().describe('The y coordinate'),
|
|
55
|
+
dblClick: z
|
|
56
|
+
.boolean()
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Set to true for double clicks. Default is false.'),
|
|
59
|
+
},
|
|
60
|
+
handler: async (params, driver) => {
|
|
61
|
+
await driver.clickAtCoordinates(params.x, params.y, params.dblClick);
|
|
62
|
+
return {
|
|
63
|
+
content: [
|
|
64
|
+
{
|
|
65
|
+
type: 'text',
|
|
66
|
+
text: params.dblClick
|
|
67
|
+
? 'Successfully double clicked at the coordinates.'
|
|
68
|
+
: 'Successfully clicked at the coordinates.',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
71
|
+
};
|
|
72
|
+
},
|
|
73
|
+
}),
|
|
74
|
+
defineTool({
|
|
75
|
+
name: 'right_click',
|
|
76
|
+
description: 'Right-click (context click) on the provided element.',
|
|
77
|
+
slimDescription: 'Right-click element.',
|
|
78
|
+
schema: {
|
|
79
|
+
uid: z
|
|
80
|
+
.string()
|
|
81
|
+
.describe('The uid of an element on the page from the page content snapshot'),
|
|
82
|
+
},
|
|
83
|
+
handler: async (params, driver) => {
|
|
84
|
+
await driver.rightClick(params.uid);
|
|
85
|
+
return {
|
|
86
|
+
content: [
|
|
87
|
+
{
|
|
88
|
+
type: 'text',
|
|
89
|
+
text: 'Successfully right-clicked on the element.',
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
defineTool({
|
|
96
|
+
name: 'select_option',
|
|
97
|
+
description: 'Select an option from a <select> dropdown by value or visible label.',
|
|
98
|
+
slimDescription: 'Select dropdown option.',
|
|
99
|
+
schema: {
|
|
100
|
+
uid: z
|
|
101
|
+
.string()
|
|
102
|
+
.describe('The uid of a <select> element from the page content snapshot.'),
|
|
103
|
+
value: z.string().optional().describe('The option value to select.'),
|
|
104
|
+
label: z
|
|
105
|
+
.string()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe('The visible text of the option to select.'),
|
|
108
|
+
},
|
|
109
|
+
handler: async (params, driver) => {
|
|
110
|
+
await driver.selectOption(params.uid, params.value, params.label);
|
|
111
|
+
return {
|
|
112
|
+
content: [
|
|
113
|
+
{
|
|
114
|
+
type: 'text',
|
|
115
|
+
text: `Selected option${params.label ? ` "${params.label}"` : ''}${params.value ? ` (value: ${params.value})` : ''}.`,
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
};
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
defineTool({
|
|
122
|
+
name: 'hover',
|
|
123
|
+
description: 'Hover over the provided element.',
|
|
124
|
+
slimDescription: 'Hover over element.',
|
|
125
|
+
schema: {
|
|
126
|
+
uid: z
|
|
127
|
+
.string()
|
|
128
|
+
.describe('The uid of an element on the page from the page content snapshot'),
|
|
129
|
+
},
|
|
130
|
+
handler: async (params, driver) => {
|
|
131
|
+
try {
|
|
132
|
+
await driver.hoverElement(params.uid);
|
|
133
|
+
return {
|
|
134
|
+
content: [
|
|
135
|
+
{
|
|
136
|
+
type: 'text',
|
|
137
|
+
text: 'Successfully hovered over the element.',
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
return {
|
|
144
|
+
content: [
|
|
145
|
+
{
|
|
146
|
+
type: 'text',
|
|
147
|
+
text: `Failed to hover over element uid ${params.uid}: ${error instanceof Error ? error.message : String(error)}`,
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
isError: true,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
}),
|
|
155
|
+
defineTool({
|
|
156
|
+
name: 'fill',
|
|
157
|
+
description: 'Type text into an input, text area or select an option from a <select> element.',
|
|
158
|
+
slimDescription: 'Fill input or select.',
|
|
159
|
+
schema: {
|
|
160
|
+
uid: z
|
|
161
|
+
.string()
|
|
162
|
+
.describe('The uid of an element on the page from the page content snapshot'),
|
|
163
|
+
value: z.string().describe('The value to fill in'),
|
|
164
|
+
},
|
|
165
|
+
handler: async (params, driver) => {
|
|
166
|
+
try {
|
|
167
|
+
await driver.fillElement(params.uid, params.value);
|
|
168
|
+
return {
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: 'text',
|
|
172
|
+
text: 'Successfully filled out the element.',
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
return {
|
|
179
|
+
content: [
|
|
180
|
+
{
|
|
181
|
+
type: 'text',
|
|
182
|
+
text: `Failed to fill element uid ${params.uid}: ${error instanceof Error ? error.message : String(error)}`,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
isError: true,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
}),
|
|
190
|
+
defineTool({
|
|
191
|
+
name: 'fill_form',
|
|
192
|
+
description: 'Fill out multiple form elements at once.',
|
|
193
|
+
slimDescription: 'Batch fill form fields.',
|
|
194
|
+
schema: {
|
|
195
|
+
elements: z
|
|
196
|
+
.array(z.object({
|
|
197
|
+
uid: z.string().describe('The uid of the element to fill out'),
|
|
198
|
+
value: z.string().describe('Value for the element'),
|
|
199
|
+
}))
|
|
200
|
+
.describe('Elements from snapshot to fill out.'),
|
|
201
|
+
},
|
|
202
|
+
handler: async (params, driver) => {
|
|
203
|
+
for (const el of params.elements) {
|
|
204
|
+
await driver.fillElement(el.uid, el.value);
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
content: [
|
|
208
|
+
{
|
|
209
|
+
type: 'text',
|
|
210
|
+
text: 'Successfully filled out the form.',
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
};
|
|
214
|
+
},
|
|
215
|
+
}),
|
|
216
|
+
defineTool({
|
|
217
|
+
name: 'type_text',
|
|
218
|
+
description: 'Type text using keyboard into a previously focused input.',
|
|
219
|
+
slimDescription: 'Type text via keyboard.',
|
|
220
|
+
schema: {
|
|
221
|
+
text: z.string().describe('The text to type'),
|
|
222
|
+
submitKey: z
|
|
223
|
+
.string()
|
|
224
|
+
.optional()
|
|
225
|
+
.describe('Optional key to press after typing. E.g., "Enter", "Tab", "Escape"'),
|
|
226
|
+
},
|
|
227
|
+
handler: async (params, driver) => {
|
|
228
|
+
await driver.typeText(params.text, params.submitKey);
|
|
229
|
+
const suffix = params.submitKey ? ` + ${params.submitKey}` : '';
|
|
230
|
+
return {
|
|
231
|
+
content: [
|
|
232
|
+
{
|
|
233
|
+
type: 'text',
|
|
234
|
+
text: `Typed text "${params.text}${suffix}"`,
|
|
235
|
+
},
|
|
236
|
+
],
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
}),
|
|
240
|
+
defineTool({
|
|
241
|
+
name: 'drag',
|
|
242
|
+
description: 'Drag an element onto another element.',
|
|
243
|
+
slimDescription: 'Drag and drop element.',
|
|
244
|
+
schema: {
|
|
245
|
+
from_uid: z.string().describe('The uid of the element to drag'),
|
|
246
|
+
to_uid: z.string().describe('The uid of the element to drop into'),
|
|
247
|
+
},
|
|
248
|
+
handler: async (params, driver) => {
|
|
249
|
+
await driver.dragElement(params.from_uid, params.to_uid);
|
|
250
|
+
return {
|
|
251
|
+
content: [
|
|
252
|
+
{
|
|
253
|
+
type: 'text',
|
|
254
|
+
text: 'Successfully dragged the element.',
|
|
255
|
+
},
|
|
256
|
+
],
|
|
257
|
+
};
|
|
258
|
+
},
|
|
259
|
+
}),
|
|
260
|
+
defineTool({
|
|
261
|
+
name: 'press_key',
|
|
262
|
+
description: 'Press a key or key combination. Use this when other input methods like fill() cannot be used.',
|
|
263
|
+
slimDescription: 'Press key or combo.',
|
|
264
|
+
schema: {
|
|
265
|
+
key: z
|
|
266
|
+
.string()
|
|
267
|
+
.describe('A key or a combination (e.g., "Enter", "Control+A", "Meta+Shift+R"). Modifiers: Control, Shift, Alt, Meta'),
|
|
268
|
+
},
|
|
269
|
+
handler: async (params, driver) => {
|
|
270
|
+
await driver.pressKey(params.key);
|
|
271
|
+
return {
|
|
272
|
+
content: [
|
|
273
|
+
{
|
|
274
|
+
type: 'text',
|
|
275
|
+
text: `Successfully pressed key: ${params.key}`,
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
}),
|
|
281
|
+
defineTool({
|
|
282
|
+
name: 'upload_file',
|
|
283
|
+
description: 'Upload a file through a provided file input element.',
|
|
284
|
+
slimDescription: 'Upload file to input.',
|
|
285
|
+
schema: {
|
|
286
|
+
uid: z
|
|
287
|
+
.string()
|
|
288
|
+
.describe('The uid of the file input element on the page from the page content snapshot'),
|
|
289
|
+
filePath: z.string().describe('The local path of the file to upload'),
|
|
290
|
+
},
|
|
291
|
+
handler: async (params, driver) => {
|
|
292
|
+
try {
|
|
293
|
+
await driver.uploadFile(params.uid, params.filePath);
|
|
294
|
+
return {
|
|
295
|
+
content: [
|
|
296
|
+
{
|
|
297
|
+
type: 'text',
|
|
298
|
+
text: `File uploaded from ${params.filePath}.`,
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
return {
|
|
305
|
+
content: [
|
|
306
|
+
{
|
|
307
|
+
type: 'text',
|
|
308
|
+
text: `Failed to upload file: ${error instanceof Error ? error.message : String(error)}`,
|
|
309
|
+
},
|
|
310
|
+
],
|
|
311
|
+
isError: true,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
}),
|
|
316
|
+
];
|
|
259
317
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/tools/input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/tools/input.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,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ACnE,eAAe,EAAE,uBAAuB;QACxC,MAAM,EAAE;YACN,GAAG,EAAE,CAAC;iBACH,MAAM,EAAE;iBACR,QAAQ,CACP,8EAA8E,CAC/E;YACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;SACtE;QACD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE;YAChC,IAAI,CAAC;gBACH,MAAM,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;gBACrD,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,sBAAsB,MAAM,CAAC,QAAQ,GAAG;yBAC/C;qBACF;iBACF,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO;oBACL,OAAO,EAAE;wBACP;4BACE,IAAI,EAAE,MAAe;4BACrB,IAAI,EAAE,0BAA0B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;yBACzF;qBACF;oBACD,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC;CACH,CAAC"}
|
|
@@ -3,17 +3,5 @@
|
|
|
3
3
|
* Mirrors chrome-devtools-mcp tool names: list_network_requests, get_network_request
|
|
4
4
|
*/
|
|
5
5
|
import { z } from 'zod';
|
|
6
|
-
|
|
7
|
-
export declare const listNetworkRequestsSchema: {
|
|
8
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
pageIdx: z.ZodOptional<z.ZodNumber>;
|
|
10
|
-
resourceTypes: z.ZodOptional<z.ZodArray<z.ZodEnum<["document", "stylesheet", "image", "media", "font", "script", "xhr", "fetch", "websocket", "other"]>, "many">>;
|
|
11
|
-
};
|
|
12
|
-
export declare const listNetworkRequests: ToolHandler;
|
|
13
|
-
export declare const clearNetworkSchema: {};
|
|
14
|
-
export declare const clearNetwork: ToolHandler;
|
|
15
|
-
export declare const getNetworkRequestSchema: {
|
|
16
|
-
reqid: z.ZodNumber;
|
|
17
|
-
};
|
|
18
|
-
export declare const getNetworkRequest: ToolHandler;
|
|
6
|
+
export declare const tools: import("./types.js").ToolDef<z.ZodRawShape>[];
|
|
19
7
|
//# sourceMappingURL=network.d.ts.map
|