mcp-accessibility-scanner 1.0.11 → 1.1.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/NOTICE.md +21 -0
- package/Readme.md +155 -125
- package/cli.js +18 -0
- package/lib/browserContextFactory.js +228 -0
- package/lib/browserContextFactory.js.map +1 -0
- package/lib/browserServer.js +152 -0
- package/lib/browserServer.js.map +1 -0
- package/lib/config.js +190 -0
- package/lib/config.js.map +1 -0
- package/lib/connection.js +83 -0
- package/lib/connection.js.map +1 -0
- package/lib/context.js +292 -0
- package/lib/context.js.map +1 -0
- package/lib/fileUtils.js +33 -0
- package/lib/fileUtils.js.map +1 -0
- package/lib/httpServer.js +202 -0
- package/lib/httpServer.js.map +1 -0
- package/lib/index.js +37 -0
- package/lib/index.js.map +1 -0
- package/lib/javascript.js +50 -0
- package/lib/javascript.js.map +1 -0
- package/lib/manualPromise.js +112 -0
- package/lib/manualPromise.js.map +1 -0
- package/lib/package.js +21 -0
- package/lib/package.js.map +1 -0
- package/lib/pageSnapshot.js +44 -0
- package/lib/pageSnapshot.js.map +1 -0
- package/lib/program.js +72 -0
- package/lib/program.js.map +1 -0
- package/lib/server.js +49 -0
- package/lib/server.js.map +1 -0
- package/lib/tab.js +102 -0
- package/lib/tab.js.map +1 -0
- package/lib/tools/common.js +69 -0
- package/lib/tools/common.js.map +1 -0
- package/lib/tools/console.js +45 -0
- package/lib/tools/console.js.map +1 -0
- package/lib/tools/dialogs.js +53 -0
- package/lib/tools/dialogs.js.map +1 -0
- package/lib/tools/files.js +52 -0
- package/lib/tools/files.js.map +1 -0
- package/lib/tools/install.js +57 -0
- package/lib/tools/install.js.map +1 -0
- package/lib/tools/keyboard.js +47 -0
- package/lib/tools/keyboard.js.map +1 -0
- package/lib/tools/navigate.js +94 -0
- package/lib/tools/navigate.js.map +1 -0
- package/lib/tools/network.js +52 -0
- package/lib/tools/network.js.map +1 -0
- package/lib/tools/pdf.js +50 -0
- package/lib/tools/pdf.js.map +1 -0
- package/lib/tools/screenshot.js +78 -0
- package/lib/tools/screenshot.js.map +1 -0
- package/lib/tools/snapshot.js +245 -0
- package/lib/tools/snapshot.js.map +1 -0
- package/lib/tools/tabs.js +119 -0
- package/lib/tools/tabs.js.map +1 -0
- package/lib/tools/tool.js +19 -0
- package/lib/tools/tool.js.map +1 -0
- package/lib/tools/utils.js +81 -0
- package/lib/tools/utils.js.map +1 -0
- package/lib/tools/vision.js +190 -0
- package/lib/tools/vision.js.map +1 -0
- package/lib/tools/wait.js +60 -0
- package/lib/tools/wait.js.map +1 -0
- package/lib/tools.js +59 -0
- package/lib/tools.js.map +1 -0
- package/lib/transport.js +134 -0
- package/lib/transport.js.map +1 -0
- package/package.json +41 -13
- package/build/accessibilityChecker.js +0 -379
- package/build/index.js +0 -958
- package/build/server.js +0 -50
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
const uploadFile = captureSnapshot => defineTool({
|
|
19
|
+
capability: 'files',
|
|
20
|
+
schema: {
|
|
21
|
+
name: 'browser_file_upload',
|
|
22
|
+
title: 'Upload files',
|
|
23
|
+
description: 'Upload one or multiple files',
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
paths: z.array(z.string()).describe('The absolute paths to the files to upload. Can be a single file or multiple files.'),
|
|
26
|
+
}),
|
|
27
|
+
type: 'destructive',
|
|
28
|
+
},
|
|
29
|
+
handle: async (context, params) => {
|
|
30
|
+
const modalState = context.modalStates().find(state => state.type === 'fileChooser');
|
|
31
|
+
if (!modalState)
|
|
32
|
+
throw new Error('No file chooser visible');
|
|
33
|
+
const code = [
|
|
34
|
+
`// <internal code to chose files ${params.paths.join(', ')}`,
|
|
35
|
+
];
|
|
36
|
+
const action = async () => {
|
|
37
|
+
await modalState.fileChooser.setFiles(params.paths);
|
|
38
|
+
context.clearModalState(modalState);
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
code,
|
|
42
|
+
action,
|
|
43
|
+
captureSnapshot,
|
|
44
|
+
waitForNetwork: true,
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
clearsModalState: 'fileChooser',
|
|
48
|
+
});
|
|
49
|
+
export default (captureSnapshot) => [
|
|
50
|
+
uploadFile(captureSnapshot),
|
|
51
|
+
];
|
|
52
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/tools/files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAoB,MAAM,WAAW,CAAC;AAEzD,MAAM,UAAU,GAAgB,eAAe,CAAC,EAAE,CAAC,UAAU,CAAC;IAC5D,UAAU,EAAE,OAAO;IAEnB,MAAM,EAAE;QACN,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,8BAA8B;QAC3C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,oFAAoF,CAAC;SAC1H,CAAC;QACF,IAAI,EAAE,aAAa;KACpB;IAED,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;QAChC,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC;QACrF,IAAI,CAAC,UAAU;YACb,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAE7C,MAAM,IAAI,GAAG;YACX,oCAAoC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SAC9D,CAAC;QAEF,MAAM,MAAM,GAAG,KAAK,IAAI,EAAE;YACxB,MAAM,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACpD,OAAO,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,MAAM;YACN,eAAe;YACf,cAAc,EAAE,IAAI;SACrB,CAAC;IACJ,CAAC;IACD,gBAAgB,EAAE,aAAa;CAChC,CAAC,CAAC;AAEH,eAAe,CAAC,eAAwB,EAAE,EAAE,CAAC;IAC3C,UAAU,CAAC,eAAe,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { fork } from 'child_process';
|
|
17
|
+
import { z } from 'zod';
|
|
18
|
+
import { defineTool } from './tool.js';
|
|
19
|
+
import { createRequire } from "node:module";
|
|
20
|
+
const install = defineTool({
|
|
21
|
+
capability: 'install',
|
|
22
|
+
schema: {
|
|
23
|
+
name: 'browser_install',
|
|
24
|
+
title: 'Install the browser specified in the config',
|
|
25
|
+
description: 'Install the browser specified in the config. Call this if you get an error about the browser not being installed.',
|
|
26
|
+
inputSchema: z.object({}),
|
|
27
|
+
type: 'destructive',
|
|
28
|
+
},
|
|
29
|
+
handle: async (context) => {
|
|
30
|
+
const channel = context.config.browser?.launchOptions?.channel ?? context.config.browser?.browserName ?? 'chrome';
|
|
31
|
+
const require = createRequire(import.meta.url);
|
|
32
|
+
const cliPath = require.resolve('playwright/cli.js');
|
|
33
|
+
const child = fork(cliPath, ['install', channel], {
|
|
34
|
+
stdio: 'pipe',
|
|
35
|
+
});
|
|
36
|
+
const output = [];
|
|
37
|
+
child.stdout?.on('data', data => output.push(data.toString()));
|
|
38
|
+
child.stderr?.on('data', data => output.push(data.toString()));
|
|
39
|
+
await new Promise((resolve, reject) => {
|
|
40
|
+
child.on('close', code => {
|
|
41
|
+
if (code === 0)
|
|
42
|
+
resolve();
|
|
43
|
+
else
|
|
44
|
+
reject(new Error(`Failed to install browser: ${output.join('')}`));
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
code: [`// Browser ${channel} installed`],
|
|
49
|
+
captureSnapshot: false,
|
|
50
|
+
waitForNetwork: false,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
export default [
|
|
55
|
+
install,
|
|
56
|
+
];
|
|
57
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","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C,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC/D,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC1C,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE;gBACvB,IAAI,IAAI,KAAK,CAAC;oBACZ,OAAO,EAAE,CAAC;;oBAEV,MAAM,CAAC,IAAI,KAAK,CAAC,8BAA8B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YACvE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,OAAO;YACL,IAAI,EAAE,CAAC,cAAc,OAAO,YAAY,CAAC;YACzC,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;SACtB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe;IACb,OAAO;CACR,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
const pressKey = captureSnapshot => defineTool({
|
|
19
|
+
capability: 'core',
|
|
20
|
+
schema: {
|
|
21
|
+
name: 'browser_press_key',
|
|
22
|
+
title: 'Press a key',
|
|
23
|
+
description: 'Press a key on the keyboard',
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
key: z.string().describe('Name of the key to press or a character to generate, such as `ArrowLeft` or `a`'),
|
|
26
|
+
}),
|
|
27
|
+
type: 'destructive',
|
|
28
|
+
},
|
|
29
|
+
handle: async (context, params) => {
|
|
30
|
+
const tab = context.currentTabOrDie();
|
|
31
|
+
const code = [
|
|
32
|
+
`// Press ${params.key}`,
|
|
33
|
+
`await page.keyboard.press('${params.key}');`,
|
|
34
|
+
];
|
|
35
|
+
const action = () => tab.page.keyboard.press(params.key);
|
|
36
|
+
return {
|
|
37
|
+
code,
|
|
38
|
+
action,
|
|
39
|
+
captureSnapshot,
|
|
40
|
+
waitForNetwork: true
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
export default (captureSnapshot) => [
|
|
45
|
+
pressKey(captureSnapshot),
|
|
46
|
+
];
|
|
47
|
+
//# sourceMappingURL=keyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../src/tools/keyboard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAoB,MAAM,WAAW,CAAC;AAEzD,MAAM,QAAQ,GAAgB,eAAe,CAAC,EAAE,CAAC,UAAU,CAAC;IAC1D,UAAU,EAAE,MAAM;IAElB,MAAM,EAAE;QACN,IAAI,EAAE,mBAAmB;QACzB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,6BAA6B;QAC1C,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iFAAiF,CAAC;SAC5G,CAAC;QACF,IAAI,EAAE,aAAa;KACpB;IAED,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAEtC,MAAM,IAAI,GAAG;YACX,YAAY,MAAM,CAAC,GAAG,EAAE;YACxB,8BAA8B,MAAM,CAAC,GAAG,KAAK;SAC9C,CAAC;QAEF,MAAM,MAAM,GAAG,GAAG,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAEzD,OAAO;YACL,IAAI;YACJ,MAAM;YACN,eAAe;YACf,cAAc,EAAE,IAAI;SACrB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe,CAAC,eAAwB,EAAE,EAAE,CAAC;IAC3C,QAAQ,CAAC,eAAe,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
const navigate = captureSnapshot => defineTool({
|
|
19
|
+
capability: 'core',
|
|
20
|
+
schema: {
|
|
21
|
+
name: 'browser_navigate',
|
|
22
|
+
title: 'Navigate to a URL',
|
|
23
|
+
description: 'Navigate to a URL',
|
|
24
|
+
inputSchema: z.object({
|
|
25
|
+
url: z.string().describe('The URL to navigate to'),
|
|
26
|
+
}),
|
|
27
|
+
type: 'destructive',
|
|
28
|
+
},
|
|
29
|
+
handle: async (context, params) => {
|
|
30
|
+
const tab = await context.ensureTab();
|
|
31
|
+
await tab.navigate(params.url);
|
|
32
|
+
const code = [
|
|
33
|
+
`// Navigate to ${params.url}`,
|
|
34
|
+
`await page.goto('${params.url}');`,
|
|
35
|
+
];
|
|
36
|
+
return {
|
|
37
|
+
code,
|
|
38
|
+
captureSnapshot,
|
|
39
|
+
waitForNetwork: false,
|
|
40
|
+
};
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
const goBack = captureSnapshot => defineTool({
|
|
44
|
+
capability: 'history',
|
|
45
|
+
schema: {
|
|
46
|
+
name: 'browser_navigate_back',
|
|
47
|
+
title: 'Go back',
|
|
48
|
+
description: 'Go back to the previous page',
|
|
49
|
+
inputSchema: z.object({}),
|
|
50
|
+
type: 'readOnly',
|
|
51
|
+
},
|
|
52
|
+
handle: async (context) => {
|
|
53
|
+
const tab = await context.ensureTab();
|
|
54
|
+
await tab.page.goBack();
|
|
55
|
+
const code = [
|
|
56
|
+
`// Navigate back`,
|
|
57
|
+
`await page.goBack();`,
|
|
58
|
+
];
|
|
59
|
+
return {
|
|
60
|
+
code,
|
|
61
|
+
captureSnapshot,
|
|
62
|
+
waitForNetwork: false,
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
const goForward = captureSnapshot => defineTool({
|
|
67
|
+
capability: 'history',
|
|
68
|
+
schema: {
|
|
69
|
+
name: 'browser_navigate_forward',
|
|
70
|
+
title: 'Go forward',
|
|
71
|
+
description: 'Go forward to the next page',
|
|
72
|
+
inputSchema: z.object({}),
|
|
73
|
+
type: 'readOnly',
|
|
74
|
+
},
|
|
75
|
+
handle: async (context) => {
|
|
76
|
+
const tab = context.currentTabOrDie();
|
|
77
|
+
await tab.page.goForward();
|
|
78
|
+
const code = [
|
|
79
|
+
`// Navigate forward`,
|
|
80
|
+
`await page.goForward();`,
|
|
81
|
+
];
|
|
82
|
+
return {
|
|
83
|
+
code,
|
|
84
|
+
captureSnapshot,
|
|
85
|
+
waitForNetwork: false,
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
export default (captureSnapshot) => [
|
|
90
|
+
navigate(captureSnapshot),
|
|
91
|
+
goBack(captureSnapshot),
|
|
92
|
+
goForward(captureSnapshot),
|
|
93
|
+
];
|
|
94
|
+
//# sourceMappingURL=navigate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigate.js","sourceRoot":"","sources":["../../src/tools/navigate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAoB,MAAM,WAAW,CAAC;AAEzD,MAAM,QAAQ,GAAgB,eAAe,CAAC,EAAE,CAAC,UAAU,CAAC;IAC1D,UAAU,EAAE,MAAM;IAElB,MAAM,EAAE;QACN,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,mBAAmB;QAChC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;SACnD,CAAC;QACF,IAAI,EAAE,aAAa;KACpB;IAED,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;QAChC,MAAM,GAAG,GAAG,MAAM,OAAO,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAE/B,MAAM,IAAI,GAAG;YACX,kBAAkB,MAAM,CAAC,GAAG,EAAE;YAC9B,oBAAoB,MAAM,CAAC,GAAG,KAAK;SACpC,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,eA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AC,CAAC;AAEH,eAAe,CAAC,eAAwB,EAAE,EAAE,CAAC;IAC3C,QAAQ,CAAC,eAAe,CAAC;IACzB,MAAM,CAAC,eAAe,CAAC;IACvB,SAAS,CAAC,eAAe,CAAC;CAC3B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
const requests = defineTool({
|
|
19
|
+
capability: 'core',
|
|
20
|
+
schema: {
|
|
21
|
+
name: 'browser_network_requests',
|
|
22
|
+
title: 'List network requests',
|
|
23
|
+
description: 'Returns all network requests since loading the page',
|
|
24
|
+
inputSchema: z.object({}),
|
|
25
|
+
type: 'readOnly',
|
|
26
|
+
},
|
|
27
|
+
handle: async (context) => {
|
|
28
|
+
const requests = context.currentTabOrDie().requests();
|
|
29
|
+
const log = [...requests.entries()].map(([request, response]) => renderRequest(request, response)).join('\n');
|
|
30
|
+
return {
|
|
31
|
+
code: [`// <internal code to list network requests>`],
|
|
32
|
+
action: async () => {
|
|
33
|
+
return {
|
|
34
|
+
content: [{ type: 'text', text: log }]
|
|
35
|
+
};
|
|
36
|
+
},
|
|
37
|
+
captureSnapshot: false,
|
|
38
|
+
waitForNetwork: false,
|
|
39
|
+
};
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
function renderRequest(request, response) {
|
|
43
|
+
const result = [];
|
|
44
|
+
result.push(`[${request.method().toUpperCase()}] ${request.url()}`);
|
|
45
|
+
if (response)
|
|
46
|
+
result.push(`=> [${response.status()}] ${response.statusText()}`);
|
|
47
|
+
return result.join(' ');
|
|
48
|
+
}
|
|
49
|
+
export default [
|
|
50
|
+
requests,
|
|
51
|
+
];
|
|
52
|
+
//# sourceMappingURL=network.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.js","sourceRoot":"","sources":["../../src/tools/network.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAIvC,MAAM,QAAQ,GAAG,UAAU,CAAC;IAC1B,UAAU,EAAE,MAAM;IAElB,MAAM,EAAE;QACN,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,IAAI,EAAE,UAAU;KACjB;IAED,MAAM,EAAE,KAAK,EAAC,OAAO,EAAC,EAAE;QACtB,MAAM,QAAQ,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,CAAC;QACtD,MAAM,GAAG,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9G,OAAO;YACL,IAAI,EAAE,CAAC,6CAA6C,CAAC;YACrD,MAAM,EAAE,KAAK,IAAI,EAAE;gBACjB,OAAO;oBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;iBACvC,CAAC;YACJ,CAAC;YACD,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;SACtB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,aAAa,CAAC,OAA2B,EAAE,QAAoC;IACtF,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,MAAM,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,KAAK,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACpE,IAAI,QAAQ;QACV,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,MAAM,EAAE,KAAK,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,eAAe;IACb,QAAQ;CACT,CAAC"}
|
package/lib/tools/pdf.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
import * as javascript from '../javascript.js';
|
|
19
|
+
import { outputFile } from '../config.js';
|
|
20
|
+
const pdfSchema = z.object({
|
|
21
|
+
filename: z.string().optional().describe('File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.'),
|
|
22
|
+
});
|
|
23
|
+
const pdf = defineTool({
|
|
24
|
+
capability: 'pdf',
|
|
25
|
+
schema: {
|
|
26
|
+
name: 'browser_pdf_save',
|
|
27
|
+
title: 'Save as PDF',
|
|
28
|
+
description: 'Save page as PDF',
|
|
29
|
+
inputSchema: pdfSchema,
|
|
30
|
+
type: 'readOnly',
|
|
31
|
+
},
|
|
32
|
+
handle: async (context, params) => {
|
|
33
|
+
const tab = context.currentTabOrDie();
|
|
34
|
+
const fileName = await outputFile(context.config, params.filename ?? `page-${new Date().toISOString()}.pdf`);
|
|
35
|
+
const code = [
|
|
36
|
+
`// Save page as ${fileName}`,
|
|
37
|
+
`await page.pdf(${javascript.formatObject({ path: fileName })});`,
|
|
38
|
+
];
|
|
39
|
+
return {
|
|
40
|
+
code,
|
|
41
|
+
action: async () => tab.page.pdf({ path: fileName }).then(() => { }),
|
|
42
|
+
captureSnapshot: false,
|
|
43
|
+
waitForNetwork: false,
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
export default [
|
|
48
|
+
pdf,
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=pdf.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf.js","sourceRoot":"","sources":["../../src/tools/pdf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,UAAU,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC;IACzB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oFAAoF,CAAC;CAC/H,CAAC,CAAC;AAEH,MAAM,GAAG,GAAG,UAAU,CAAC;IACrB,UAAU,EAAE,KAAK;IAEjB,MAAM,EAAE;QACN,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,SAAS;QACtB,IAAI,EAAE,UAAU;KACjB;IAED,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;QAChC,MAAM,GAAG,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAE7G,MAAM,IAAI,GAAG;YACX,mBAAmB,QAAQ,EAAE;YAC7B,kBAAkB,UAAU,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI;SAClE,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC;YACnE,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,KAAK;SACtB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAEH,eAAe;IACb,GAAG;CACJ,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { z } from 'zod';
|
|
17
|
+
import { defineTool } from './tool.js';
|
|
18
|
+
import * as javascript from '../javascript.js';
|
|
19
|
+
import { outputFile } from '../config.js';
|
|
20
|
+
import { generateLocator } from './utils.js';
|
|
21
|
+
const screenshotSchema = z.object({
|
|
22
|
+
raw: z.boolean().optional().describe('Whether to return without compression (in PNG format). Default is false, which returns a JPEG image.'),
|
|
23
|
+
filename: z.string().optional().describe('File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified.'),
|
|
24
|
+
element: z.string().optional().describe('Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.'),
|
|
25
|
+
ref: z.string().optional().describe('Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.'),
|
|
26
|
+
}).refine(data => {
|
|
27
|
+
return !!data.element === !!data.ref;
|
|
28
|
+
}, {
|
|
29
|
+
message: 'Both element and ref must be provided or neither.',
|
|
30
|
+
path: ['ref', 'element']
|
|
31
|
+
});
|
|
32
|
+
const screenshot = defineTool({
|
|
33
|
+
capability: 'core',
|
|
34
|
+
schema: {
|
|
35
|
+
name: 'browser_take_screenshot',
|
|
36
|
+
title: 'Take a screenshot',
|
|
37
|
+
description: `Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.`,
|
|
38
|
+
inputSchema: screenshotSchema,
|
|
39
|
+
type: 'readOnly',
|
|
40
|
+
},
|
|
41
|
+
handle: async (context, params) => {
|
|
42
|
+
const tab = context.currentTabOrDie();
|
|
43
|
+
const snapshot = tab.snapshotOrDie();
|
|
44
|
+
const fileType = params.raw ? 'png' : 'jpeg';
|
|
45
|
+
const fileName = await outputFile(context.config, params.filename ?? `page-${new Date().toISOString()}.${fileType}`);
|
|
46
|
+
const options = { type: fileType, quality: fileType === 'png' ? undefined : 50, scale: 'css', path: fileName };
|
|
47
|
+
const isElementScreenshot = params.element && params.ref;
|
|
48
|
+
const code = [
|
|
49
|
+
`// Screenshot ${isElementScreenshot ? params.element : 'viewport'} and save it as ${fileName}`,
|
|
50
|
+
];
|
|
51
|
+
const locator = params.ref ? snapshot.refLocator({ element: params.element || '', ref: params.ref }) : null;
|
|
52
|
+
if (locator)
|
|
53
|
+
code.push(`await page.${await generateLocator(locator)}.screenshot(${javascript.formatObject(options)});`);
|
|
54
|
+
else
|
|
55
|
+
code.push(`await page.screenshot(${javascript.formatObject(options)});`);
|
|
56
|
+
const includeBase64 = context.clientSupportsImages();
|
|
57
|
+
const action = async () => {
|
|
58
|
+
const screenshot = locator ? await locator.screenshot(options) : await tab.page.screenshot(options);
|
|
59
|
+
return {
|
|
60
|
+
content: includeBase64 ? [{
|
|
61
|
+
type: 'image',
|
|
62
|
+
data: screenshot.toString('base64'),
|
|
63
|
+
mimeType: fileType === 'png' ? 'image/png' : 'image/jpeg',
|
|
64
|
+
}] : []
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
code,
|
|
69
|
+
action,
|
|
70
|
+
captureSnapshot: true,
|
|
71
|
+
waitForNetwork: false,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
export default [
|
|
76
|
+
screenshot,
|
|
77
|
+
];
|
|
78
|
+
//# sourceMappingURL=screenshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenshot.js","sourceRoot":"","sources":["../../src/tools/screenshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAA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