auto-chrome-mcp-shared 1.2.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 +1 -1
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +63 -2
- package/dist/index.mjs +63 -2
- package/package.json +39 -39
- package/LICENSE +0 -21
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# chrome-mcp-scalemaker-shared
|
|
2
2
|
|
|
3
|
-
Internal shared types, constants, and message contracts used by the [
|
|
3
|
+
Internal shared types, constants, and message contracts used by the [auto-chrome-mcp](https://github.com/cw02326/auto-chrome-mcp) Chrome extension and the [`mcp-chrome-scalemaker-bridge`](https://www.npmjs.com/package/mcp-chrome-scalemaker-bridge) Node.js Native Messaging host.
|
|
4
4
|
|
|
5
5
|
**Not intended for direct end-user consumption.** Public APIs are not guaranteed stable across minor versions — pin a specific version if you depend on it.
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -116,7 +116,12 @@ var TOOL_NAMES = {
|
|
|
116
116
|
SET_WORK_TAB: "chrome_set_work_tab",
|
|
117
117
|
WAIT_FOR: "chrome_wait_for",
|
|
118
118
|
SCROLL_COLLECT: "chrome_scroll_collect",
|
|
119
|
-
EXTRACT: "chrome_extract"
|
|
119
|
+
EXTRACT: "chrome_extract",
|
|
120
|
+
FIND: "chrome_find",
|
|
121
|
+
SHORTCUT: "chrome_shortcut",
|
|
122
|
+
// stdio 프록시 전용 (extension 으로 forward 되지 않음 — mcp-server-stdio.ts 가 가로챔)
|
|
123
|
+
LIST_BROWSERS: "chrome_list_browsers",
|
|
124
|
+
USE_BROWSER: "chrome_use_browser"
|
|
120
125
|
},
|
|
121
126
|
RECORD_REPLAY: {
|
|
122
127
|
FLOW_RUN: "record_replay_flow_run",
|
|
@@ -150,6 +155,62 @@ var TOOL_SCHEMAS = [
|
|
|
150
155
|
required: ["steps"]
|
|
151
156
|
}
|
|
152
157
|
},
|
|
158
|
+
{
|
|
159
|
+
name: TOOL_NAMES.BROWSER.FIND,
|
|
160
|
+
description: 'Find elements on the page using natural language (Korean or English), e.g. "\uB85C\uADF8\uC778 \uBC84\uD2BC", "search input", "\uC7A5\uBC14\uAD6C\uB2C8 \uC544\uC774\uCF58". Matches element names/roles/placeholder/text via synonym + fuzzy scoring over the accessibility tree and returns ranked candidates with ref (usable directly in chrome_click_element / chrome_fill_or_select), role, name, coordinates, and frameId. Cheaper and more direct than reading the whole page when you know what you are looking for.',
|
|
161
|
+
inputSchema: {
|
|
162
|
+
type: "object",
|
|
163
|
+
properties: {
|
|
164
|
+
query: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "Natural language description of the element (Korean/English)"
|
|
167
|
+
},
|
|
168
|
+
tabId: {
|
|
169
|
+
type: "number",
|
|
170
|
+
description: "Optional target tab id. Defaults to the MCP work tab (background work mode) or the active tab."
|
|
171
|
+
},
|
|
172
|
+
maxResults: { type: "number", description: "Max candidates to return (default 5, max 20)" },
|
|
173
|
+
allFrames: {
|
|
174
|
+
type: "boolean",
|
|
175
|
+
description: "Also search inside iframes (default true)"
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
required: ["query"]
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
name: TOOL_NAMES.BROWSER.SHORTCUT,
|
|
183
|
+
description: 'Save and run named multi-step shortcuts (macro = a chrome_batch step list stored under a name). action="save" stores {name, steps, description}; "run" executes a saved shortcut through the normal tool pipeline; "list" shows saved shortcuts; "delete" removes one. Useful for workflows you repeat across sessions (login flows, routine collection).',
|
|
184
|
+
inputSchema: {
|
|
185
|
+
type: "object",
|
|
186
|
+
properties: {
|
|
187
|
+
action: {
|
|
188
|
+
type: "string",
|
|
189
|
+
enum: ["save", "run", "list", "delete"],
|
|
190
|
+
description: "What to do"
|
|
191
|
+
},
|
|
192
|
+
name: { type: "string", description: "Shortcut name (save/run/delete)" },
|
|
193
|
+
steps: {
|
|
194
|
+
type: "array",
|
|
195
|
+
description: 'For action="save": steps in chrome_batch format, max 20. Each: { tool: string, args?: object }',
|
|
196
|
+
items: {
|
|
197
|
+
type: "object",
|
|
198
|
+
properties: {
|
|
199
|
+
tool: { type: "string" },
|
|
200
|
+
args: { type: "object" }
|
|
201
|
+
},
|
|
202
|
+
required: ["tool"]
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
description: { type: "string", description: 'For action="save": what this shortcut does' },
|
|
206
|
+
continueOnError: {
|
|
207
|
+
type: "boolean",
|
|
208
|
+
description: 'For action="run": keep running steps after a failure (default false)'
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
required: ["action"]
|
|
212
|
+
}
|
|
213
|
+
},
|
|
153
214
|
{
|
|
154
215
|
name: TOOL_NAMES.BROWSER.EXTRACT,
|
|
155
216
|
description: "Extract ONLY the fields you need from the page via CSS selectors \u2014 far cheaper than reading the whole page when you know what you want (e.g. price, title, links). Deterministic and precise. Prefer this over chrome_get_web_content/chrome_read_page for targeted scraping.",
|
|
@@ -1426,7 +1487,7 @@ Tip: If the returned elements do not include the specific element you need, use
|
|
|
1426
1487
|
},
|
|
1427
1488
|
{
|
|
1428
1489
|
name: TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT,
|
|
1429
|
-
description: 'Request user consent BEFORE invoking sensitive site features (camera, microphone, geolocation). Returns { approved, source } JSON. If the matching popup toggle is ON, returns { approved: true, source: "toggle" } immediately and sticky-sets the current active tab origin to allow via chrome.contentSettings (camera/mic/location). If OFF, opens a small consent popup window and awaits the user response (max 60s).
|
|
1490
|
+
description: 'Request user consent BEFORE invoking sensitive site features (camera, microphone, geolocation). Returns { approved, source } JSON. If the matching popup toggle is ON, returns { approved: true, source: "toggle" } immediately and sticky-sets the current active tab origin to allow via chrome.contentSettings (camera/mic/location). If OFF, opens a small consent popup window and awaits the user response (max 60s). auto-chrome-mcp fork v1.0.32+ (geolocation moved from bulk-install to per-origin consent gate for parity with camera/mic and OS-permission consistency); design: docs/plans/2026-05-29-site-permissions-design.md.',
|
|
1430
1491
|
inputSchema: {
|
|
1431
1492
|
type: "object",
|
|
1432
1493
|
properties: {
|
package/dist/index.mjs
CHANGED
|
@@ -71,7 +71,12 @@ var TOOL_NAMES = {
|
|
|
71
71
|
SET_WORK_TAB: "chrome_set_work_tab",
|
|
72
72
|
WAIT_FOR: "chrome_wait_for",
|
|
73
73
|
SCROLL_COLLECT: "chrome_scroll_collect",
|
|
74
|
-
EXTRACT: "chrome_extract"
|
|
74
|
+
EXTRACT: "chrome_extract",
|
|
75
|
+
FIND: "chrome_find",
|
|
76
|
+
SHORTCUT: "chrome_shortcut",
|
|
77
|
+
// stdio 프록시 전용 (extension 으로 forward 되지 않음 — mcp-server-stdio.ts 가 가로챔)
|
|
78
|
+
LIST_BROWSERS: "chrome_list_browsers",
|
|
79
|
+
USE_BROWSER: "chrome_use_browser"
|
|
75
80
|
},
|
|
76
81
|
RECORD_REPLAY: {
|
|
77
82
|
FLOW_RUN: "record_replay_flow_run",
|
|
@@ -105,6 +110,62 @@ var TOOL_SCHEMAS = [
|
|
|
105
110
|
required: ["steps"]
|
|
106
111
|
}
|
|
107
112
|
},
|
|
113
|
+
{
|
|
114
|
+
name: TOOL_NAMES.BROWSER.FIND,
|
|
115
|
+
description: 'Find elements on the page using natural language (Korean or English), e.g. "\uB85C\uADF8\uC778 \uBC84\uD2BC", "search input", "\uC7A5\uBC14\uAD6C\uB2C8 \uC544\uC774\uCF58". Matches element names/roles/placeholder/text via synonym + fuzzy scoring over the accessibility tree and returns ranked candidates with ref (usable directly in chrome_click_element / chrome_fill_or_select), role, name, coordinates, and frameId. Cheaper and more direct than reading the whole page when you know what you are looking for.',
|
|
116
|
+
inputSchema: {
|
|
117
|
+
type: "object",
|
|
118
|
+
properties: {
|
|
119
|
+
query: {
|
|
120
|
+
type: "string",
|
|
121
|
+
description: "Natural language description of the element (Korean/English)"
|
|
122
|
+
},
|
|
123
|
+
tabId: {
|
|
124
|
+
type: "number",
|
|
125
|
+
description: "Optional target tab id. Defaults to the MCP work tab (background work mode) or the active tab."
|
|
126
|
+
},
|
|
127
|
+
maxResults: { type: "number", description: "Max candidates to return (default 5, max 20)" },
|
|
128
|
+
allFrames: {
|
|
129
|
+
type: "boolean",
|
|
130
|
+
description: "Also search inside iframes (default true)"
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
required: ["query"]
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: TOOL_NAMES.BROWSER.SHORTCUT,
|
|
138
|
+
description: 'Save and run named multi-step shortcuts (macro = a chrome_batch step list stored under a name). action="save" stores {name, steps, description}; "run" executes a saved shortcut through the normal tool pipeline; "list" shows saved shortcuts; "delete" removes one. Useful for workflows you repeat across sessions (login flows, routine collection).',
|
|
139
|
+
inputSchema: {
|
|
140
|
+
type: "object",
|
|
141
|
+
properties: {
|
|
142
|
+
action: {
|
|
143
|
+
type: "string",
|
|
144
|
+
enum: ["save", "run", "list", "delete"],
|
|
145
|
+
description: "What to do"
|
|
146
|
+
},
|
|
147
|
+
name: { type: "string", description: "Shortcut name (save/run/delete)" },
|
|
148
|
+
steps: {
|
|
149
|
+
type: "array",
|
|
150
|
+
description: 'For action="save": steps in chrome_batch format, max 20. Each: { tool: string, args?: object }',
|
|
151
|
+
items: {
|
|
152
|
+
type: "object",
|
|
153
|
+
properties: {
|
|
154
|
+
tool: { type: "string" },
|
|
155
|
+
args: { type: "object" }
|
|
156
|
+
},
|
|
157
|
+
required: ["tool"]
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
description: { type: "string", description: 'For action="save": what this shortcut does' },
|
|
161
|
+
continueOnError: {
|
|
162
|
+
type: "boolean",
|
|
163
|
+
description: 'For action="run": keep running steps after a failure (default false)'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
required: ["action"]
|
|
167
|
+
}
|
|
168
|
+
},
|
|
108
169
|
{
|
|
109
170
|
name: TOOL_NAMES.BROWSER.EXTRACT,
|
|
110
171
|
description: "Extract ONLY the fields you need from the page via CSS selectors \u2014 far cheaper than reading the whole page when you know what you want (e.g. price, title, links). Deterministic and precise. Prefer this over chrome_get_web_content/chrome_read_page for targeted scraping.",
|
|
@@ -1381,7 +1442,7 @@ Tip: If the returned elements do not include the specific element you need, use
|
|
|
1381
1442
|
},
|
|
1382
1443
|
{
|
|
1383
1444
|
name: TOOL_NAMES.BROWSER.REQUEST_USER_CONSENT,
|
|
1384
|
-
description: 'Request user consent BEFORE invoking sensitive site features (camera, microphone, geolocation). Returns { approved, source } JSON. If the matching popup toggle is ON, returns { approved: true, source: "toggle" } immediately and sticky-sets the current active tab origin to allow via chrome.contentSettings (camera/mic/location). If OFF, opens a small consent popup window and awaits the user response (max 60s).
|
|
1445
|
+
description: 'Request user consent BEFORE invoking sensitive site features (camera, microphone, geolocation). Returns { approved, source } JSON. If the matching popup toggle is ON, returns { approved: true, source: "toggle" } immediately and sticky-sets the current active tab origin to allow via chrome.contentSettings (camera/mic/location). If OFF, opens a small consent popup window and awaits the user response (max 60s). auto-chrome-mcp fork v1.0.32+ (geolocation moved from bulk-install to per-origin consent gate for parity with camera/mic and OS-permission consistency); design: docs/plans/2026-05-29-site-permissions-design.md.',
|
|
1385
1446
|
inputSchema: {
|
|
1386
1447
|
type: "object",
|
|
1387
1448
|
properties: {
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "auto-chrome-mcp-shared",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"author": "hangye (upstream), scalemaker-ship-it (
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"module": "./dist/index.mjs",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"import": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"default": "./dist/index.mjs"
|
|
13
|
-
},
|
|
14
|
-
"require": {
|
|
15
|
-
"types": "./dist/index.d.ts",
|
|
16
|
-
"default": "./dist/index.js"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "auto-chrome-mcp-shared",
|
|
3
|
+
"version": "1.4.0",
|
|
4
|
+
"author": "hangye (upstream), scalemaker-ship-it (auto-chrome-mcp fork)",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
22
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
23
|
+
"lint": "npx eslint 'src/**/*.{js,ts}'",
|
|
24
|
+
"lint:fix": "npx eslint 'src/**/*.{js,ts}' --fix",
|
|
25
|
+
"format": "prettier --write 'src/**/*.{js,ts,json}'"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist"
|
|
29
|
+
],
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "^18.0.0",
|
|
32
|
+
"@typescript-eslint/parser": "^8.32.0",
|
|
33
|
+
"tsup": "^8.4.0"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
37
|
+
"zod": "^3.24.4"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 hangye
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|