@pyrokine/mcp-chrome 1.1.0 → 1.4.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 +130 -54
- package/dist/anti-detection/behavior.d.ts +0 -8
- package/dist/anti-detection/behavior.d.ts.map +1 -1
- package/dist/anti-detection/behavior.js +0 -16
- package/dist/anti-detection/behavior.js.map +1 -1
- package/dist/cdp/client.d.ts +0 -2
- package/dist/cdp/client.d.ts.map +1 -1
- package/dist/cdp/client.js +30 -45
- package/dist/cdp/client.js.map +1 -1
- package/dist/cdp/launcher.d.ts +1 -8
- package/dist/cdp/launcher.d.ts.map +1 -1
- package/dist/cdp/launcher.js +11 -21
- package/dist/cdp/launcher.js.map +1 -1
- package/dist/core/auto-wait.d.ts +2 -2
- package/dist/core/auto-wait.d.ts.map +1 -1
- package/dist/core/auto-wait.js +1 -1
- package/dist/core/auto-wait.js.map +1 -1
- package/dist/core/errors.d.ts +10 -13
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +19 -25
- package/dist/core/errors.js.map +1 -1
- package/dist/core/locator.d.ts +6 -7
- package/dist/core/locator.d.ts.map +1 -1
- package/dist/core/locator.js +77 -31
- package/dist/core/locator.js.map +1 -1
- package/dist/core/retry.d.ts.map +1 -1
- package/dist/core/retry.js +1 -1
- package/dist/core/retry.js.map +1 -1
- package/dist/core/session.d.ts +37 -33
- package/dist/core/session.d.ts.map +1 -1
- package/dist/core/session.js +159 -116
- package/dist/core/session.js.map +1 -1
- package/dist/core/types.d.ts +25 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js +20 -0
- package/dist/core/types.js.map +1 -1
- package/dist/core/unified-session.d.ts +105 -67
- package/dist/core/unified-session.d.ts.map +1 -1
- package/dist/core/unified-session.js +347 -186
- package/dist/core/unified-session.js.map +1 -1
- package/dist/extension/bridge.d.ts +25 -19
- package/dist/extension/bridge.d.ts.map +1 -1
- package/dist/extension/bridge.js +29 -52
- package/dist/extension/bridge.js.map +1 -1
- package/dist/extension/http-server.d.ts +13 -11
- package/dist/extension/http-server.d.ts.map +1 -1
- package/dist/extension/http-server.js +101 -95
- package/dist/extension/http-server.js.map +1 -1
- package/dist/index.js +18 -64
- package/dist/index.js.map +1 -1
- package/dist/tools/browse.d.ts +3 -80
- package/dist/tools/browse.d.ts.map +1 -1
- package/dist/tools/browse.js +135 -291
- package/dist/tools/browse.js.map +1 -1
- package/dist/tools/cookies.d.ts +3 -71
- package/dist/tools/cookies.d.ts.map +1 -1
- package/dist/tools/cookies.js +75 -157
- package/dist/tools/cookies.js.map +1 -1
- package/dist/tools/evaluate.d.ts +3 -52
- package/dist/tools/evaluate.d.ts.map +1 -1
- package/dist/tools/evaluate.js +35 -86
- package/dist/tools/evaluate.js.map +1 -1
- package/dist/tools/extract.d.ts +5 -227
- package/dist/tools/extract.d.ts.map +1 -1
- package/dist/tools/extract.js +586 -184
- package/dist/tools/extract.js.map +1 -1
- package/dist/tools/index.d.ts +9 -9
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +9 -9
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/input.d.ts +3 -258
- package/dist/tools/input.d.ts.map +1 -1
- package/dist/tools/input.js +95 -147
- package/dist/tools/input.js.map +1 -1
- package/dist/tools/logs.d.ts +3 -51
- package/dist/tools/logs.d.ts.map +1 -1
- package/dist/tools/logs.js +47 -108
- package/dist/tools/logs.js.map +1 -1
- package/dist/tools/manage.d.ts +3 -64
- package/dist/tools/manage.d.ts.map +1 -1
- package/dist/tools/manage.js +243 -373
- package/dist/tools/manage.js.map +1 -1
- package/dist/tools/schema.d.ts +16 -182
- package/dist/tools/schema.d.ts.map +1 -1
- package/dist/tools/schema.js +70 -159
- package/dist/tools/schema.js.map +1 -1
- package/dist/tools/wait.d.ts +3 -221
- package/dist/tools/wait.d.ts.map +1 -1
- package/dist/tools/wait.js +74 -145
- package/dist/tools/wait.js.map +1 -1
- package/package.json +1 -1
package/dist/tools/logs.js
CHANGED
|
@@ -7,68 +7,24 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { writeFile } from 'fs/promises';
|
|
9
9
|
import { z } from 'zod';
|
|
10
|
-
import { formatErrorResponse, getSession, getUnifiedSession } from '../core/index.js';
|
|
11
|
-
/**
|
|
12
|
-
* logs 工具定义
|
|
13
|
-
*/
|
|
14
|
-
export const logsToolDefinition = {
|
|
15
|
-
name: 'logs',
|
|
16
|
-
description: '浏览器日志:控制台日志、网络请求',
|
|
17
|
-
inputSchema: {
|
|
18
|
-
type: 'object',
|
|
19
|
-
properties: {
|
|
20
|
-
type: {
|
|
21
|
-
type: 'string',
|
|
22
|
-
enum: ['console', 'network'],
|
|
23
|
-
description: '日志类型',
|
|
24
|
-
},
|
|
25
|
-
level: {
|
|
26
|
-
type: 'string',
|
|
27
|
-
enum: ['all', 'error', 'warning', 'info', 'debug'],
|
|
28
|
-
description: '日志级别过滤(console)',
|
|
29
|
-
},
|
|
30
|
-
urlPattern: {
|
|
31
|
-
type: 'string',
|
|
32
|
-
description: 'URL 模式过滤(network),支持通配符',
|
|
33
|
-
},
|
|
34
|
-
limit: {
|
|
35
|
-
type: 'number',
|
|
36
|
-
description: '最大返回条数',
|
|
37
|
-
},
|
|
38
|
-
clear: {
|
|
39
|
-
type: 'boolean',
|
|
40
|
-
description: '获取后清除日志',
|
|
41
|
-
},
|
|
42
|
-
output: {
|
|
43
|
-
type: 'string',
|
|
44
|
-
description: '输出文件路径。若指定,日志导出为 JSON 文件',
|
|
45
|
-
},
|
|
46
|
-
tabId: {
|
|
47
|
-
type: 'string',
|
|
48
|
-
description: '目标 Tab ID(可选,仅 Extension 模式)。不指定则使用当前 attach 的 tab。可操作非当前 attach 的 tab。CDP 模式下忽略此参数',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
required: ['type'],
|
|
52
|
-
},
|
|
53
|
-
};
|
|
10
|
+
import { formatErrorResponse, formatResponse, getSession, getUnifiedSession } from '../core/index.js';
|
|
54
11
|
/**
|
|
55
12
|
* logs 参数 schema
|
|
56
13
|
*/
|
|
57
14
|
const logsSchema = z.object({
|
|
58
|
-
type: z.enum(['console', 'network']),
|
|
59
|
-
level: z.enum(['all', 'error', 'warning', 'info', 'debug']).optional(),
|
|
60
|
-
urlPattern: z.string().optional(),
|
|
61
|
-
limit: z.number().optional(),
|
|
62
|
-
clear: z.boolean().optional(),
|
|
63
|
-
output: z.string().optional(),
|
|
64
|
-
tabId: z.string().optional(),
|
|
15
|
+
type: z.enum(['console', 'network']).describe('日志类型'),
|
|
16
|
+
level: z.enum(['all', 'error', 'warning', 'info', 'debug']).optional().describe('日志级别过滤(console)'),
|
|
17
|
+
urlPattern: z.string().optional().describe('URL 模式过滤(network),支持通配符'),
|
|
18
|
+
limit: z.number().optional().describe('最大返回条数'),
|
|
19
|
+
clear: z.boolean().optional().describe('获取后清除日志'),
|
|
20
|
+
output: z.string().optional().describe('输出文件路径。若指定,日志导出为 JSON 文件'),
|
|
21
|
+
tabId: z.string().optional().describe('目标 Tab ID(可选,仅 Extension 模式)。不指定则使用当前 attach 的 tab。可操作非当前 attach 的 tab。CDP 模式下忽略此参数'),
|
|
65
22
|
});
|
|
66
23
|
/**
|
|
67
24
|
* logs 工具处理器
|
|
68
25
|
*/
|
|
69
|
-
|
|
26
|
+
async function handleLogs(args) {
|
|
70
27
|
try {
|
|
71
|
-
const args = logsSchema.parse(params);
|
|
72
28
|
const unifiedSession = getUnifiedSession();
|
|
73
29
|
const mode = unifiedSession.getMode();
|
|
74
30
|
const limit = args.limit ?? 100;
|
|
@@ -80,7 +36,9 @@ export async function handleLogs(params) {
|
|
|
80
36
|
// Extension 模式:使用 debugger API 获取控制台日志
|
|
81
37
|
await unifiedSession.enableConsole();
|
|
82
38
|
const extLogs = await unifiedSession.getConsoleLogs({
|
|
83
|
-
level: args.level === 'all' ?
|
|
39
|
+
level: args.level === 'all' ?
|
|
40
|
+
undefined :
|
|
41
|
+
args.level,
|
|
84
42
|
clear: args.clear,
|
|
85
43
|
});
|
|
86
44
|
logs = extLogs.slice(0, limit);
|
|
@@ -95,34 +53,20 @@ export async function handleLogs(params) {
|
|
|
95
53
|
}
|
|
96
54
|
if (args.output) {
|
|
97
55
|
await writeFile(args.output, JSON.stringify(logs, null, 2), 'utf-8');
|
|
98
|
-
return {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
output: args.output,
|
|
106
|
-
count: logs.length,
|
|
107
|
-
mode,
|
|
108
|
-
}),
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
};
|
|
56
|
+
return formatResponse({
|
|
57
|
+
success: true,
|
|
58
|
+
type: 'console',
|
|
59
|
+
output: args.output,
|
|
60
|
+
count: logs.length,
|
|
61
|
+
mode,
|
|
62
|
+
});
|
|
112
63
|
}
|
|
113
|
-
return {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
type: 'console',
|
|
120
|
-
logs,
|
|
121
|
-
mode,
|
|
122
|
-
}, null, 2),
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
};
|
|
64
|
+
return formatResponse({
|
|
65
|
+
success: true,
|
|
66
|
+
type: 'console',
|
|
67
|
+
logs,
|
|
68
|
+
mode,
|
|
69
|
+
});
|
|
126
70
|
}
|
|
127
71
|
case 'network': {
|
|
128
72
|
let requests;
|
|
@@ -145,34 +89,20 @@ export async function handleLogs(params) {
|
|
|
145
89
|
}
|
|
146
90
|
if (args.output) {
|
|
147
91
|
await writeFile(args.output, JSON.stringify(requests, null, 2), 'utf-8');
|
|
148
|
-
return {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
output: args.output,
|
|
156
|
-
count: requests.length,
|
|
157
|
-
mode,
|
|
158
|
-
}),
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
};
|
|
92
|
+
return formatResponse({
|
|
93
|
+
success: true,
|
|
94
|
+
type: 'network',
|
|
95
|
+
output: args.output,
|
|
96
|
+
count: requests.length,
|
|
97
|
+
mode,
|
|
98
|
+
});
|
|
162
99
|
}
|
|
163
|
-
return {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
type: 'network',
|
|
170
|
-
requests,
|
|
171
|
-
mode,
|
|
172
|
-
}, null, 2),
|
|
173
|
-
},
|
|
174
|
-
],
|
|
175
|
-
};
|
|
100
|
+
return formatResponse({
|
|
101
|
+
success: true,
|
|
102
|
+
type: 'network',
|
|
103
|
+
requests,
|
|
104
|
+
mode,
|
|
105
|
+
});
|
|
176
106
|
}
|
|
177
107
|
default:
|
|
178
108
|
return {
|
|
@@ -196,4 +126,13 @@ export async function handleLogs(params) {
|
|
|
196
126
|
return formatErrorResponse(error);
|
|
197
127
|
}
|
|
198
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* 注册 logs 工具
|
|
131
|
+
*/
|
|
132
|
+
export function registerLogsTool(server) {
|
|
133
|
+
server.registerTool('logs', {
|
|
134
|
+
description: '浏览器日志:控制台日志、网络请求',
|
|
135
|
+
inputSchema: logsSchema,
|
|
136
|
+
}, (args) => handleLogs(args));
|
|
137
|
+
}
|
|
199
138
|
//# sourceMappingURL=logs.js.map
|
package/dist/tools/logs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/tools/logs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/tools/logs.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAC,SAAS,EAAC,MAAM,aAAa,CAAA;AACrC,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAA;AACrB,OAAO,EAAC,mBAAmB,EAAE,cAAc,EAAE,UA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,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oCACI,KAAK,EAAE;wCACH,IAAI,EAAE,kBAAkB;wCACxB,OAAO,EAAE,WAAW,IAAI,CAAC,IAAI,EAAE;qCAClC;iCACJ,CAAC;6BAC1B;yBACJ;wBACD,OAAO,EAAE,IAAI;qBAChB,CAAA;YACT,CAAC;QAEL,CAAC,CAAC,CAAA,CAAC,YAAY;IACnB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAA;IACrC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiB;IAC9C,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE;QACxB,WAAW,EAAE,kBAAkB;QAC/B,WAAW,EAAE,UAAU;KAC1B,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAA;AAClC,CAAC"}
|
package/dist/tools/manage.d.ts
CHANGED
|
@@ -12,70 +12,9 @@
|
|
|
12
12
|
* - stealth: 注入反检测脚本
|
|
13
13
|
* - cdp: 发送任意 CDP 命令(高级)
|
|
14
14
|
*/
|
|
15
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
15
16
|
/**
|
|
16
|
-
* manage
|
|
17
|
+
* 注册 manage 工具
|
|
17
18
|
*/
|
|
18
|
-
export declare
|
|
19
|
-
name: string;
|
|
20
|
-
description: string;
|
|
21
|
-
inputSchema: {
|
|
22
|
-
type: "object";
|
|
23
|
-
properties: {
|
|
24
|
-
action: {
|
|
25
|
-
type: string;
|
|
26
|
-
enum: string[];
|
|
27
|
-
description: string;
|
|
28
|
-
};
|
|
29
|
-
inputMode: {
|
|
30
|
-
type: string;
|
|
31
|
-
enum: string[];
|
|
32
|
-
description: string;
|
|
33
|
-
};
|
|
34
|
-
cdpMethod: {
|
|
35
|
-
type: string;
|
|
36
|
-
description: string;
|
|
37
|
-
};
|
|
38
|
-
cdpParams: {
|
|
39
|
-
type: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
targetId: {
|
|
43
|
-
type: string;
|
|
44
|
-
description: string;
|
|
45
|
-
};
|
|
46
|
-
cacheType: {
|
|
47
|
-
type: string;
|
|
48
|
-
enum: string[];
|
|
49
|
-
description: string;
|
|
50
|
-
};
|
|
51
|
-
width: {
|
|
52
|
-
type: string;
|
|
53
|
-
description: string;
|
|
54
|
-
};
|
|
55
|
-
height: {
|
|
56
|
-
type: string;
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
userAgent: {
|
|
60
|
-
type: string;
|
|
61
|
-
description: string;
|
|
62
|
-
};
|
|
63
|
-
device: {
|
|
64
|
-
type: string;
|
|
65
|
-
description: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
required: string[];
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* manage 工具处理器
|
|
73
|
-
*/
|
|
74
|
-
export declare function handleManage(params: unknown): Promise<{
|
|
75
|
-
content: Array<{
|
|
76
|
-
type: 'text';
|
|
77
|
-
text: string;
|
|
78
|
-
}>;
|
|
79
|
-
isError?: boolean;
|
|
80
|
-
}>;
|
|
19
|
+
export declare function registerManageTool(server: McpServer): void;
|
|
81
20
|
//# sourceMappingURL=manage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../src/tools/manage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"manage.d.ts","sourceRoot":"","sources":["../../src/tools/manage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAA;AA2VtE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAK1D"}
|