@ada-mcp/mcp-server 0.1.2 → 0.1.4
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 +28 -4
- package/dist/cli.cjs +12 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,9 +25,10 @@ npx -y @ada-mcp/mcp-server
|
|
|
25
25
|
| 配置 | 含义 |
|
|
26
26
|
|------|------|
|
|
27
27
|
| (未配置) | 仅安装 **Playwright + 浏览器** |
|
|
28
|
-
| `playwright` |
|
|
29
|
-
| `
|
|
30
|
-
| `appium` | Appium 包 +
|
|
28
|
+
| `playwright` | 仅 Playwright(显式写法,与默认相同) |
|
|
29
|
+
| `selenium` | **仅** Selenium 原生驱动(GeckoDriver/ChromeDriver) |
|
|
30
|
+
| `appium` | **仅** Appium 包 + 移动端驱动 |
|
|
31
|
+
| `playwright,selenium` | 组合(逗号连接多类) |
|
|
31
32
|
| `all` | 上述全部 |
|
|
32
33
|
| `none` / `skip` | 不自动安装 |
|
|
33
34
|
|
|
@@ -37,6 +38,26 @@ npx -y @ada-mcp/mcp-server
|
|
|
37
38
|
- `ADA_MCP_SKIP_INSTALL_DEPS=1`:跳过自动安装
|
|
38
39
|
- `ADA_MCP_INSTALL_DEPS_FORCE=1`:强制重装
|
|
39
40
|
- `ADA_MCP_GECKODRIVER_VERSION` / `ADA_MCP_CHROMEDRIVER_VERSION`:Selenium 驱动版本
|
|
41
|
+
- `ADA_PLAYWRIGHT_INSTALL_TIMEOUT_MS`:浏览器下载超时(默认 15 分钟)
|
|
42
|
+
- `ADA_INSTALL_STRATEGY_TIMEOUT_MS`:npm 装包超时(默认 2 分钟)
|
|
43
|
+
|
|
44
|
+
## 代理与镜像(`0.1.3+`)
|
|
45
|
+
|
|
46
|
+
| 阶段 | 自动探测最快镜像 |
|
|
47
|
+
|------|------------------|
|
|
48
|
+
| `pnpm dlx` / `npx` 拉 MCP 包 | 否 — 用 `npm_config_registry` 或 `pnpm dlx --registry …` |
|
|
49
|
+
| 启动后 `install-deps` | 是 — 内置五家国内镜像 + 官方源测速选最快(**无需配置**) |
|
|
50
|
+
|
|
51
|
+
默认 npm 探测候选(按优先级,延迟相同取靠前):阿里云 npmmirror → 腾讯云 → 清华 → 华为云 → 网易 → npm 官方。
|
|
52
|
+
|
|
53
|
+
| 变量 | 说明 |
|
|
54
|
+
|------|------|
|
|
55
|
+
| `npm_config_registry` | 可选;仅加速 **dlx** 拉包(推荐 `https://registry.npmmirror.com`) |
|
|
56
|
+
| `ADA_REGISTRY_CANDIDATES` | 可选;在默认五镜像**之外**追加候选 |
|
|
57
|
+
| `ADA_NPM_PROXY_REGISTRY` / `ADA_PNPM_PROXY_REGISTRY` | 可选;覆盖探测主候选(默认 npmmirror) |
|
|
58
|
+
| `PLAYWRIGHT_DOWNLOAD_HOST` | 可选;Playwright 浏览器 CDN |
|
|
59
|
+
|
|
60
|
+
详见 [ADA-MCP-接入手册 §3.9.2](../../docs/ADA-MCP-接入手册.md#392-代理与镜像配置)。
|
|
40
61
|
|
|
41
62
|
**CLI 参数**(写在 MCP `args` 末尾)
|
|
42
63
|
|
|
@@ -83,7 +104,10 @@ npx -y @ada-mcp/mcp-server
|
|
|
83
104
|
"mcpServers": {
|
|
84
105
|
"ada-mcp": {
|
|
85
106
|
"command": "pnpm",
|
|
86
|
-
"args": ["dlx", "@ada-mcp/mcp-server"]
|
|
107
|
+
"args": ["dlx", "@ada-mcp/mcp-server@0.1.3"],
|
|
108
|
+
"env": {
|
|
109
|
+
"npm_config_registry": "https://registry.npmmirror.com"
|
|
110
|
+
}
|
|
87
111
|
}
|
|
88
112
|
}
|
|
89
113
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -6514,7 +6514,16 @@ function resolveBootstrapInstallDeps(argv2) {
|
|
|
6514
6514
|
if (nativeDir) extras.nativeDriversDir = nativeDir;
|
|
6515
6515
|
return { skip: false, scopes, force, extras };
|
|
6516
6516
|
}
|
|
6517
|
+
function ensureDefaultInstallTimeouts() {
|
|
6518
|
+
if (!process.env.ADA_INSTALL_STRATEGY_TIMEOUT_MS?.trim()) {
|
|
6519
|
+
process.env.ADA_INSTALL_STRATEGY_TIMEOUT_MS = "120000";
|
|
6520
|
+
}
|
|
6521
|
+
if (!process.env.ADA_PLAYWRIGHT_INSTALL_TIMEOUT_MS?.trim()) {
|
|
6522
|
+
process.env.ADA_PLAYWRIGHT_INSTALL_TIMEOUT_MS = "900000";
|
|
6523
|
+
}
|
|
6524
|
+
}
|
|
6517
6525
|
async function runBootstrapInstallDeps(argv2) {
|
|
6526
|
+
ensureDefaultInstallTimeouts();
|
|
6518
6527
|
const plan = resolveBootstrapInstallDeps(argv2);
|
|
6519
6528
|
if (plan.skip) {
|
|
6520
6529
|
console.error("[ADA-MCP] dependency bootstrap skipped (--skip-install-deps / ADA_MCP_SKIP_INSTALL_DEPS)");
|
|
@@ -6601,7 +6610,7 @@ var import_promises11 = __toESM(require("node:fs/promises"));
|
|
|
6601
6610
|
var import_node_path11 = __toESM(require("node:path"));
|
|
6602
6611
|
|
|
6603
6612
|
// src/bundled-config.generated.ts
|
|
6604
|
-
var bundledDefaultConfigYaml2 = 'agent:\r\n id: "ada-agent-local"\r\n mode: "foreground"\r\n setupOnFirstRun: true\r\n\r\nbootstrapUI:\r\n enabled: true\r\n mode: "auto" # auto | cli | gui\r\n host: "127.0.0.1"\r\n port: 17650\r\n autoOpenBrowser: true\r\n sessionTtlSec: 600\r\n secretsProvider: "auto" # auto | keychain | credman | file\r\n native:\r\n enabled: false\r\n command: "" # e.g. ./bootstrap-ui / .\\bootstrap-ui.exe\r\n args: []\r\n timeoutMs: 120000\r\n fallbackToWeb: true\r\n\r\ntransport:\r\n mode: "auto"\r\n streamProtocol: "websocket"\r\n requestPath: "/api/v1/execute"\r\n healthPath: "/health"\r\n streamPath: "/ws"\r\n requestTimeoutMs: 15000\r\n\r\ngraphics:\r\n enabled: false\r\n fallbackOnSemanticFailure: false\r\n minConfidence: 0.8\r\n\r\nmonitoring:\r\n enabled: false\r\n platforms: ["web", "android", "ios", "harmony"] # \u53EF\u9009\u5B50\u96C6\r\n sampleEvery: 1 # \u6BCF N \u6761\u64CD\u4F5C\u91C7\u6837\u4E00\u6B21\uFF0C1 \u8868\u793A\u5168\u91CF\r\n outputDir: "artifacts/monitoring"\r\n onFailureOnly: false # true \u65F6\u4EC5\u5931\u8D25\u64CD\u4F5C\u6293\u56FE\uFF0C\u6027\u80FD\u66F4\u4F18\r\n groupBySession: true # \u6309 sessionId/requestId \u5206\u5C42\u5F52\u6863\r\n nonBlocking: true # true \u65F6\u76D1\u63A7\u5F02\u6B65\u6267\u884C\uFF0C\u4E0D\u963B\u585E\u4E3B\u94FE\u8DEF\r\n resolution:\r\n maxWidth: 1280\r\n maxHeight: 720\r\n keepAspectRatio: true # \u4FDD\u6301\u6BD4\u4F8B\uFF0C\u907F\u514D\u76D1\u63A7\u56FE\u50CF\u53D8\u5F62\r\n\r\nqueue:\r\n inboxDir: "tasks/inbox"\r\n processedDir: "tasks/processed"\r\n failedDir: "tasks/failed"\r\n pollIntervalMs: 3000\r\n maxFileRetryAttempts: 2\r\n\r\ndependencies:\r\n autoInstallOnStart: true\r\n playwrightBrowser: "chromium" # chromium | firefox | webkit | all\r\n playwrightInstallTargets: ["chrome"] # chromium | chrome | msedge | firefox | webkit | all\r\n playwrightDownloadHost: "https://npmmirror.com/mirrors/playwright"\r\n npmRegistryCandidates:\r\n - "https://registry.npmmirror.com"\r\n - "https://mirrors.cloud.tencent.com/npm"\r\n - "https://repo.huaweicloud.com/repository/npm"\r\n - "https://registry.npmjs.org"\r\n playwrightHostCandidates:\r\n - "https://npmmirror.com/mirrors/playwright"\r\n - "https://playwright.azureedge.net"\r\n # \u539F\u751F WebDriver\uFF08geckodriver / chromedriver\uFF09\u7EDF\u4E00\u653E\u5728\u9879\u76EE dirver \u76EE\u5F55\r\n nativeDriversDir: "dirver"\r\n geckodriverVersion: "latest" # \u5982 0.36.0\uFF1Binstall-deps --only=selenium \u65F6\u4E0B\u8F7D\u5230\u6B64\u76EE\u5F55\r\n chromedriverVersion: "latest" # \u5982 137\u3001135\u3001match-chrome\uFF08\u5339\u914D\u672C\u673A Chrome \u4E3B\u7248\u672C\uFF09\r\n\r\nappium:\r\n serverUrl: "http://127.0.0.1:4723"\r\n requiredDrivers: ["uiautomator2", "xcuitest", "harmonyos"]\r\n';
|
|
6613
|
+
var bundledDefaultConfigYaml2 = 'agent:\r\n id: "ada-agent-local"\r\n mode: "foreground"\r\n setupOnFirstRun: true\r\n\r\nbootstrapUI:\r\n enabled: true\r\n mode: "auto" # auto | cli | gui\r\n host: "127.0.0.1"\r\n port: 17650\r\n autoOpenBrowser: true\r\n sessionTtlSec: 600\r\n secretsProvider: "auto" # auto | keychain | credman | file\r\n native:\r\n enabled: false\r\n command: "" # e.g. ./bootstrap-ui / .\\bootstrap-ui.exe\r\n args: []\r\n timeoutMs: 120000\r\n fallbackToWeb: true\r\n\r\ntransport:\r\n mode: "auto"\r\n streamProtocol: "websocket"\r\n requestPath: "/api/v1/execute"\r\n healthPath: "/health"\r\n streamPath: "/ws"\r\n requestTimeoutMs: 15000\r\n\r\ngraphics:\r\n enabled: false\r\n fallbackOnSemanticFailure: false\r\n minConfidence: 0.8\r\n\r\nmonitoring:\r\n enabled: false\r\n platforms: ["web", "android", "ios", "harmony"] # \u53EF\u9009\u5B50\u96C6\r\n sampleEvery: 1 # \u6BCF N \u6761\u64CD\u4F5C\u91C7\u6837\u4E00\u6B21\uFF0C1 \u8868\u793A\u5168\u91CF\r\n outputDir: "artifacts/monitoring"\r\n onFailureOnly: false # true \u65F6\u4EC5\u5931\u8D25\u64CD\u4F5C\u6293\u56FE\uFF0C\u6027\u80FD\u66F4\u4F18\r\n groupBySession: true # \u6309 sessionId/requestId \u5206\u5C42\u5F52\u6863\r\n nonBlocking: true # true \u65F6\u76D1\u63A7\u5F02\u6B65\u6267\u884C\uFF0C\u4E0D\u963B\u585E\u4E3B\u94FE\u8DEF\r\n resolution:\r\n maxWidth: 1280\r\n maxHeight: 720\r\n keepAspectRatio: true # \u4FDD\u6301\u6BD4\u4F8B\uFF0C\u907F\u514D\u76D1\u63A7\u56FE\u50CF\u53D8\u5F62\r\n\r\nqueue:\r\n inboxDir: "tasks/inbox"\r\n processedDir: "tasks/processed"\r\n failedDir: "tasks/failed"\r\n pollIntervalMs: 3000\r\n maxFileRetryAttempts: 2\r\n\r\ndependencies:\r\n autoInstallOnStart: true\r\n playwrightBrowser: "chromium" # chromium | firefox | webkit | all\r\n playwrightInstallTargets: ["chrome"] # chromium | chrome | msedge | firefox | webkit | all\r\n playwrightDownloadHost: "https://npmmirror.com/mirrors/playwright"\r\n # \u56FD\u5185 npm \u955C\u50CF\uFF08\u6309\u4F18\u5148\u7EA7\uFF1Binstall-deps \u542F\u52A8\u65F6\u6D4B\u901F\u9009\u6700\u5FEB\uFF0C\u65E0\u9700\u7528\u6237\u914D\u7F6E\uFF09\r\n npmRegistryCandidates:\r\n - "https://registry.npmmirror.com" # \u963F\u91CC\u4E91 / npmmirror\uFF08\u63A8\u8350\uFF09\r\n - "https://mirrors.cloud.tencent.com/npm" # \u817E\u8BAF\u4E91\r\n - "https://mirrors.tuna.tsinghua.edu.cn/npm" # \u6E05\u534E\u5927\u5B66\r\n - "https://repo.huaweicloud.com/repository/npm" # \u534E\u4E3A\u4E91\r\n - "https://mirrors.163.com/npm" # \u7F51\u6613\r\n - "https://registry.npmjs.org" # \u5B98\u65B9\u515C\u5E95\r\n playwrightHostCandidates:\r\n - "https://npmmirror.com/mirrors/playwright"\r\n - "https://playwright.azureedge.net"\r\n # \u539F\u751F WebDriver\uFF08geckodriver / chromedriver\uFF09\u7EDF\u4E00\u653E\u5728\u9879\u76EE dirver \u76EE\u5F55\r\n nativeDriversDir: "dirver"\r\n geckodriverVersion: "latest" # \u5982 0.36.0\uFF1Binstall-deps --only=selenium \u65F6\u4E0B\u8F7D\u5230\u6B64\u76EE\u5F55\r\n chromedriverVersion: "latest" # \u5982 137\u3001135\u3001match-chrome\uFF08\u5339\u914D\u672C\u673A Chrome \u4E3B\u7248\u672C\uFF09\r\n\r\nappium:\r\n serverUrl: "http://127.0.0.1:4723"\r\n requiredDrivers: ["uiautomator2", "xcuitest", "harmonyos"]\r\n';
|
|
6605
6614
|
|
|
6606
6615
|
// src/config.ts
|
|
6607
6616
|
var DEFAULT_CONFIG_RELATIVE2 = import_node_path11.default.join("config", "default.yaml");
|
|
@@ -8331,7 +8340,8 @@ async function startMcpServer() {
|
|
|
8331
8340
|
ADA_MCP_INSTALL_DEPS: "playwright",
|
|
8332
8341
|
ADA_NPM_PROXY_REGISTRY: "https://registry.npmmirror.com",
|
|
8333
8342
|
ADA_PNPM_PROXY_REGISTRY: "https://registry.npmmirror.com",
|
|
8334
|
-
ADA_INSTALL_STRATEGY_TIMEOUT_MS: "
|
|
8343
|
+
ADA_INSTALL_STRATEGY_TIMEOUT_MS: "120000",
|
|
8344
|
+
ADA_PLAYWRIGHT_INSTALL_TIMEOUT_MS: "900000"
|
|
8335
8345
|
}
|
|
8336
8346
|
}
|
|
8337
8347
|
}
|