@mearl/setup 2.22.4 → 2.23.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 +40 -36
- package/dist/aliSkills.js +3 -3
- package/dist/browserExtension.js +7 -13
- package/dist/cli.js +13 -13
- package/dist/lifecycle.js +1 -1
- package/dist/plugin.js +2 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,21 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Mearl 环境的一次性安装、更新、卸载与配置工具。无需先全局安装 setup:
|
|
4
4
|
|
|
5
|
+
要求 Node.js >= 20.18.0。首次安装可执行 `npx @mearl/setup@2` 选择最新稳定 2.x;
|
|
6
|
+
若出现 `Unknown operation: plugin`,先检查 `node --version`,再用 `npx @mearl/setup@2 --version`
|
|
7
|
+
确认安装器版本。未指定版本时,npm 可能优先选择兼容旧 Node 的历史版本。
|
|
8
|
+
|
|
5
9
|
```bash
|
|
6
|
-
npx @mearl/setup [install] [--local] [--cloud|--qoder-cloud] [--mcp]
|
|
7
|
-
npx @mearl/setup update [--local] [--cloud|--qoder-cloud] [--mcp]
|
|
8
|
-
npx @mearl/setup uninstall [--local] [--cloud|--qoder-cloud] [--mcp] [--full]
|
|
9
|
-
npx @mearl/setup extension [--full] [--force]
|
|
10
|
-
npx @mearl/setup plugin [name] <path>
|
|
11
|
-
npx @mearl/setup plugin install <ali-skills add 参数...>
|
|
12
|
-
npx @mearl/setup plugin uninstall <name>
|
|
13
|
-
npx @mearl/setup provider <install|update|uninstall> <package|id>
|
|
10
|
+
npx @mearl/setup@2 [install] [--local] [--cloud|--qoder-cloud] [--mcp]
|
|
11
|
+
npx @mearl/setup@2 update [--local] [--cloud|--qoder-cloud] [--mcp]
|
|
12
|
+
npx @mearl/setup@2 uninstall [--local] [--cloud|--qoder-cloud] [--mcp] [--full]
|
|
13
|
+
npx @mearl/setup@2 extension [--full] [--force]
|
|
14
|
+
npx @mearl/setup@2 plugin [name] <path>
|
|
15
|
+
npx @mearl/setup@2 plugin install <ali-skills add 参数...>
|
|
16
|
+
npx @mearl/setup@2 plugin uninstall <name>
|
|
17
|
+
npx @mearl/setup@2 provider <install|update|uninstall> <package|id>
|
|
14
18
|
```
|
|
15
19
|
|
|
16
20
|
浏览器 Provider 独立安装和演进。安装后运行 `mearl <providerId>` 查看该版本声明的能力、
|
|
17
21
|
配置和启动参数。
|
|
18
22
|
|
|
19
|
-
在 Qoder Cloud Agent 环境中,使用 `npx @mearl/setup --qoder-cloud --yes` 选择 Qoder
|
|
23
|
+
在 Qoder Cloud Agent 环境中,使用 `npx @mearl/setup@2 --qoder-cloud --yes` 选择 Qoder
|
|
20
24
|
配对模式。它与 `--cloud` 安装同一套 cloud-server、client 和 Skill,只把 cloud-server
|
|
21
25
|
模式记录为 Qoder;`mearl-cloud-server` 的命令交互保持不变,`start` 和 `restart` 输出新的
|
|
22
26
|
配对指令后退出,不监听端口或保留守护进程。配对 URL 不包含 Qoder PAT。
|
|
@@ -26,7 +30,7 @@ npx @mearl/setup provider <install|update|uninstall> <package|id>
|
|
|
26
30
|
一个命令安装 skill 并注册它的 CLI、SDK 和 MCP 能力:
|
|
27
31
|
|
|
28
32
|
```bash
|
|
29
|
-
npx @mearl/setup plugin install trip/mearl --skill yuque-doc-fetch --yes
|
|
33
|
+
npx @mearl/setup@2 plugin install trip/mearl --branch 2.x --skill yuque-doc-fetch --yes
|
|
30
34
|
mearl yuque read "https://aliyuque.antfin.com/group/book/doc"
|
|
31
35
|
```
|
|
32
36
|
|
|
@@ -41,7 +45,7 @@ registry 可访问时通过 Ali Skills 批量处理 `mearl` 与 `tdbank-account`
|
|
|
41
45
|
更新发现 TDBank 插件缺少注册时,会在批量更新已跟踪项后通过一次 `add` 补装并恢复注册。
|
|
42
46
|
该 registry 不用于下载插件。
|
|
43
47
|
探测不可用时按普通外网流程只处理 Mearl Skill;内网批量命令失败时 setup 失败,不再逐项重试。
|
|
44
|
-
|
|
48
|
+
安装和更新默认选择 2.x 的最新稳定运行包。`--target-line` 可指定次版本系列。`--skip-skill` 和 `--target-line` 安装不执行自动插件步骤。
|
|
45
49
|
|
|
46
50
|
Mearl client 内置 `buc`、`authx` 与 `tdbank` 的安装来源。CLI、SDK、MCP 或另一个插件首次调用尚未注册的这些插件时,会通过内部幂等流程安装并重试一次;其他未注册名称不会触发安装。BUC 与 AuthX 不随 setup 预装。
|
|
47
51
|
|
|
@@ -52,8 +56,8 @@ Mearl client 内置 `buc`、`authx` 与 `tdbank` 的安装来源。CLI、SDK、M
|
|
|
52
56
|
已通过其他渠道分发的 skill 或自定义入口,可以直接传入路径注册:
|
|
53
57
|
|
|
54
58
|
```bash
|
|
55
|
-
npx @mearl/setup plugin /absolute/path/to/yuque-doc-fetch
|
|
56
|
-
npx @mearl/setup plugin custom ./skills/custom/entry.mjs
|
|
59
|
+
npx @mearl/setup@2 plugin /absolute/path/to/yuque-doc-fetch
|
|
60
|
+
npx @mearl/setup@2 plugin custom ./skills/custom/entry.mjs
|
|
57
61
|
```
|
|
58
62
|
|
|
59
63
|
path 接受目录或具体文件;目录默认读取 `scripts/main.mjs` 或 `scripts/main.py`,相对路径基于调用工作目录解析。插件名优先使用显式 name,其次读取入口的 `name` metadata,最后回退到 Skill 目录名;常规注册只传 path,显式 name 仅用于覆盖或兼容旧入口。Python 插件要求 `python3 >= 3.9`,可通过 `MEARL_PYTHON` 指定解释器路径;setup 只验证入口可加载,不安装 Python,也不执行 `pip install`。
|
|
@@ -66,7 +70,7 @@ native-host 会幂等初始化 Skills 模式。基础环境补齐或初始化失
|
|
|
66
70
|
不再需要插件时执行:
|
|
67
71
|
|
|
68
72
|
```bash
|
|
69
|
-
npx @mearl/setup plugin uninstall yuque
|
|
73
|
+
npx @mearl/setup@2 plugin uninstall yuque
|
|
70
74
|
```
|
|
71
75
|
|
|
72
76
|
若入口位于 `~/.agents/skills/<skill>/`,setup 会先执行
|
|
@@ -82,9 +86,9 @@ Provider 由 npm 包分发,但包本身无需暴露 CLI 或安装脚本。setu
|
|
|
82
86
|
可创建的浏览器类型名称及其表单参数:
|
|
83
87
|
|
|
84
88
|
```bash
|
|
85
|
-
npx @mearl/setup provider install @ali/mearl-provider-brow
|
|
86
|
-
npx @mearl/setup provider update brow
|
|
87
|
-
npx @mearl/setup provider uninstall brow
|
|
89
|
+
npx @mearl/setup@2 provider install @ali/mearl-provider-brow
|
|
90
|
+
npx @mearl/setup@2 provider update brow
|
|
91
|
+
npx @mearl/setup@2 provider uninstall brow
|
|
88
92
|
```
|
|
89
93
|
|
|
90
94
|
安装参数接受包名、版本或 dist-tag;更新和卸载可使用 `providerId` 或完整包名。`@ali/*` 包的
|
|
@@ -96,8 +100,8 @@ npx @mearl/setup provider uninstall brow
|
|
|
96
100
|
## 行为
|
|
97
101
|
|
|
98
102
|
- Mearl 自有 npm 包的安装和更新固定使用 `https://registry.npmjs.org/`,与最新版本查询使用同一来源;第三方包沿用当前包管理器的源配置。
|
|
99
|
-
- `install` 可以省略;直接执行 `npx @mearl/setup` 等同于 `npx @mearl/setup install`。
|
|
100
|
-
以选项开头时也默认安装,例如 `npx @mearl/setup --cloud --yes`。
|
|
103
|
+
- `install` 可以省略;直接执行 `npx @mearl/setup@2` 等同于 `npx @mearl/setup@2 install`。
|
|
104
|
+
以选项开头时也默认安装,例如 `npx @mearl/setup@2 --cloud --yes`。
|
|
101
105
|
- `install` 未指定环境时默认 `--local`。
|
|
102
106
|
- `-h` / `--help` 显示帮助,`-v` / `--version` 显示 setup 版本。
|
|
103
107
|
- `update` 和 `uninstall` 未指定环境时,从当前 `PATH` 中的
|
|
@@ -145,19 +149,19 @@ npx @mearl/setup provider uninstall brow
|
|
|
145
149
|
## 安装或更新浏览器扩展
|
|
146
150
|
|
|
147
151
|
```bash
|
|
148
|
-
npx @mearl/setup extension
|
|
152
|
+
npx @mearl/setup@2 extension
|
|
149
153
|
```
|
|
150
154
|
|
|
151
155
|
首次使用时可一次安装完整的本地浏览器环境:
|
|
152
156
|
|
|
153
157
|
```bash
|
|
154
|
-
npx @mearl/setup extension --full
|
|
158
|
+
npx @mearl/setup@2 extension --full
|
|
155
159
|
```
|
|
156
160
|
|
|
157
161
|
首次安装、旧版 setup 扩展首次迁移,或 Native Host reload 不可用时才需要 CDP。如果
|
|
158
162
|
Chrome 尚未开放 CDP,交互命令会提示打开
|
|
159
163
|
`chrome://inspect/#remote-debugging`、启用远程调试并允许连接,然后等待安装完成。面向人的
|
|
160
|
-
安装指引不要添加 `--yes`。无 TTY 环境使用 `npx @mearl/setup extension --yes`;它只尝试
|
|
164
|
+
安装指引不要添加 `--yes`。无 TTY 环境使用 `npx @mearl/setup@2 extension --yes`;它只尝试
|
|
161
165
|
一次,CDP 不可用时立即中断。无法确认 setup 管理来源且 CDP 不可用时不会下载或修改插件
|
|
162
166
|
目录,打开 CDP 后重新执行同一命令即可。Chrome 版本过低、缺少扩展安装所需的 CDP 方法时,
|
|
163
167
|
命令会中断并提示升级 Chrome。
|
|
@@ -187,7 +191,7 @@ DevTools 面板的设置按钮会显示红点,快捷设置中提供“立即
|
|
|
187
191
|
|
|
188
192
|
自动更新不会降级较新的 Host,也不会改动 cloud、MCP 或独立安装的 Mearl Skill。
|
|
189
193
|
目标 npm 版本尚未发布、网络不可用或更新失败时,旧 Host 会继续运行;下一次扩展后台
|
|
190
|
-
生命周期可重新尝试,也可手动执行 `npx @mearl/setup update --local`。
|
|
194
|
+
生命周期可重新尝试,也可手动执行 `npx @mearl/setup@2 update --local`。
|
|
191
195
|
|
|
192
196
|
## 人工与 Agent 使用
|
|
193
197
|
|
|
@@ -202,41 +206,41 @@ DevTools 面板的设置按钮会显示红点,快捷设置中提供“立即
|
|
|
202
206
|
|
|
203
207
|
```bash
|
|
204
208
|
# 默认安装本地浏览器环境
|
|
205
|
-
npx @mearl/setup
|
|
209
|
+
npx @mearl/setup@2
|
|
206
210
|
|
|
207
211
|
# 与上一条等价
|
|
208
|
-
npx @mearl/setup install
|
|
212
|
+
npx @mearl/setup@2 install
|
|
209
213
|
|
|
210
214
|
# Agent / CI 无交互安装
|
|
211
|
-
npx @mearl/setup --yes
|
|
215
|
+
npx @mearl/setup@2 --yes
|
|
212
216
|
|
|
213
217
|
# 安装云端 Agent 环境
|
|
214
|
-
npx @mearl/setup --cloud
|
|
218
|
+
npx @mearl/setup@2 --cloud
|
|
215
219
|
|
|
216
220
|
# 同一台机器同时作为本地浏览器宿主和云端 Agent
|
|
217
|
-
npx @mearl/setup --local --cloud
|
|
221
|
+
npx @mearl/setup@2 --local --cloud
|
|
218
222
|
|
|
219
223
|
# 自动更新当前 PATH 中检测到的全部 Mearl 环境
|
|
220
|
-
npx @mearl/setup update
|
|
224
|
+
npx @mearl/setup@2 update
|
|
221
225
|
|
|
222
226
|
# 独立安装或更新到最新浏览器扩展
|
|
223
|
-
npx @mearl/setup extension
|
|
227
|
+
npx @mearl/setup@2 extension
|
|
224
228
|
|
|
225
229
|
# 安装完整本地环境(client、Native Host、Skill 和扩展)
|
|
226
|
-
npx @mearl/setup extension --full
|
|
230
|
+
npx @mearl/setup@2 extension --full
|
|
227
231
|
|
|
228
232
|
# 只卸载本地环境
|
|
229
|
-
npx @mearl/setup uninstall --local
|
|
233
|
+
npx @mearl/setup@2 uninstall --local
|
|
230
234
|
|
|
231
235
|
# 自动检测并无交互卸载
|
|
232
|
-
npx @mearl/setup uninstall --yes
|
|
236
|
+
npx @mearl/setup@2 uninstall --yes
|
|
233
237
|
|
|
234
238
|
# 卸载环境,并清理全部 CLI 插件与 Provider
|
|
235
|
-
npx @mearl/setup uninstall --full
|
|
239
|
+
npx @mearl/setup@2 uninstall --full
|
|
236
240
|
|
|
237
241
|
# 安装可选浏览器 Provider
|
|
238
|
-
npx @mearl/setup provider install @ali/mearl-provider-brow
|
|
239
|
-
npx @mearl/setup provider install @ali/mearl-provider-agentbay
|
|
242
|
+
npx @mearl/setup@2 provider install @ali/mearl-provider-brow
|
|
243
|
+
npx @mearl/setup@2 provider install @ali/mearl-provider-agentbay
|
|
240
244
|
```
|
|
241
245
|
|
|
242
246
|
原有 Mearl 环境包的 npm/npx 安装方式和 CLI 保持可用;setup 是统一的便利入口。
|
package/dist/aliSkills.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { spawn } from 'node:child_process';
|
|
5
|
-
import { executableNames, findExecutable, isExecutable, prependCommandPath, prependNodePath, resolveSpawnCommand, runCommand, versionManagerExecutableCandidates, } from '@mearl/daemon-core';
|
|
5
|
+
import { executableNames, findExecutable, isExecutable, npmExecEnvironment, prependCommandPath, prependNodePath, resolveSpawnCommand, runCommand, versionManagerExecutableCandidates, } from '@mearl/daemon-core';
|
|
6
6
|
const COMMAND_TIMEOUT_MS = 120_000;
|
|
7
7
|
const MAX_OUTPUT_LENGTH = 1_000_000;
|
|
8
8
|
const ANSI_ESCAPE_PATTERN = new RegExp(String.raw `\u001B\[[0-?]*[ -/]*[@-~]`, 'g');
|
|
@@ -49,7 +49,7 @@ export const runAliSkillsCli = (executable, args, cwd) => new Promise((resolve,
|
|
|
49
49
|
const launch = resolveSpawnCommand(executable, args);
|
|
50
50
|
const child = spawn(launch.command, launch.args, {
|
|
51
51
|
cwd,
|
|
52
|
-
env: prependNodePath(prependCommandPath(executable)),
|
|
52
|
+
env: npmExecEnvironment(prependNodePath(prependCommandPath(executable))),
|
|
53
53
|
stdio: ['ignore', 'pipe', 'pipe'],
|
|
54
54
|
windowsHide: true,
|
|
55
55
|
});
|
|
@@ -107,7 +107,7 @@ export function resolveAliSkillsInvocation(options = {}) {
|
|
|
107
107
|
return {
|
|
108
108
|
command: npx,
|
|
109
109
|
argsPrefix: ['-y', 'ali-skills'],
|
|
110
|
-
env: prependNodePath(prependCommandPath(npx, env), processExecPath),
|
|
110
|
+
env: npmExecEnvironment(prependNodePath(prependCommandPath(npx, env), processExecPath)),
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
export function parseGlobalMearlSkillPaths(output) {
|
package/dist/browserExtension.js
CHANGED
|
@@ -6,7 +6,7 @@ import { runUnifiedCheck } from '@mearl/client/check';
|
|
|
6
6
|
import { CLIENT_VERSION, invoke as invokeLocalMearl } from '@mearl/client/local';
|
|
7
7
|
import extractZip from 'extract-zip';
|
|
8
8
|
import WebSocket from 'ws';
|
|
9
|
-
import { compareMearlReleaseVersions, isMearlReleaseVersion } from './version.js';
|
|
9
|
+
import { compareMearlReleaseVersions, isMearlReleaseVersion, parseMearlReleaseVersion, } from './version.js';
|
|
10
10
|
export const MEARL_EXTENSION_DOWNLOAD_PAGE = 'https://mearl.alibaba-inc.com/';
|
|
11
11
|
export const MEARL_EXTENSION_REMOTE_CONFIG_URL = `${MEARL_EXTENSION_DOWNLOAD_PAGE}config.json`;
|
|
12
12
|
export const MEARL_EXTENSION_DIRECTORY_NAME = 'chrome-extension';
|
|
@@ -78,22 +78,16 @@ export async function fetchBrowserExtensionRelease(fetchImpl = fetch) {
|
|
|
78
78
|
throw new Error(`Extension config returned HTTP ${response.status}`);
|
|
79
79
|
}
|
|
80
80
|
const config = (await response.json());
|
|
81
|
+
const version = parseMearlReleaseVersion(config.latestVersion);
|
|
82
|
+
if (version?.major !== 2 || version.channel !== 'stable') {
|
|
83
|
+
throw new Error('Remote extension config must select a stable Mearl 2.x release');
|
|
84
|
+
}
|
|
81
85
|
return validateExtensionRelease({
|
|
82
86
|
archiveUrl: typeof config.downloadUrl === 'string' ? config.downloadUrl : '',
|
|
83
87
|
...(typeof config.downloadSha256 === 'string' ? { sha256: config.downloadSha256 } : {}),
|
|
84
|
-
version:
|
|
88
|
+
version: version.raw,
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
|
-
async function resolveExtensionArchive(fetchImpl) {
|
|
88
|
-
const response = await fetchImpl(MEARL_EXTENSION_DOWNLOAD_PAGE, { redirect: 'follow' });
|
|
89
|
-
if (!response.ok) {
|
|
90
|
-
throw new Error(`Extension release page returned HTTP ${response.status}`);
|
|
91
|
-
}
|
|
92
|
-
const version = findLatestExtensionVersion(await response.text());
|
|
93
|
-
if (!version)
|
|
94
|
-
throw new Error('No Mearl browser extension archive was found on the release page');
|
|
95
|
-
return { version, archiveUrl: extensionArchiveUrl(version) };
|
|
96
|
-
}
|
|
97
91
|
function readDevToolsActivePort(userDataDirectory) {
|
|
98
92
|
try {
|
|
99
93
|
const content = fs
|
|
@@ -475,7 +469,7 @@ export async function installMearlBrowserExtension(options = {}, dependencies =
|
|
|
475
469
|
const targetDirectory = path.resolve(options.targetDirectory ?? resolveMearlExtensionDirectory());
|
|
476
470
|
const release = options.release
|
|
477
471
|
? validateExtensionRelease(options.release)
|
|
478
|
-
: await
|
|
472
|
+
: await fetchBrowserExtensionRelease(fetchImpl);
|
|
479
473
|
const chromeUserDataDirectory = options.chromeUserDataDirectory ?? resolveChromeUserDataDirectory();
|
|
480
474
|
const waitForCdpMs = Math.max(0, options.waitForCdpMs ?? 0);
|
|
481
475
|
const useSharedCdpSession = !dependencies.inspectInstallation && !dependencies.loadUnpacked;
|
package/dist/cli.js
CHANGED
|
@@ -163,7 +163,7 @@ function printHelp() {
|
|
|
163
163
|
const output = `Mearl Setup v${SETUP_VERSION}
|
|
164
164
|
|
|
165
165
|
Usage:
|
|
166
|
-
npx @mearl/setup [command] [options]
|
|
166
|
+
npx @mearl/setup@2 [command] [options]
|
|
167
167
|
|
|
168
168
|
Environment commands:
|
|
169
169
|
install [options] Install an environment (default command; target: local)
|
|
@@ -186,7 +186,7 @@ Environment options:
|
|
|
186
186
|
--cloud Manage cloud packages in WebSocket server mode
|
|
187
187
|
--qoder-cloud Manage cloud packages in Qoder pairing mode
|
|
188
188
|
--mcp Manage @mearl/mcp-server and its configuration
|
|
189
|
-
--target-line <major.minor.x>
|
|
189
|
+
--target-line <major.minor.x> Override the default 2.x package range
|
|
190
190
|
--skip-skill Keep the independently managed Mearl Skill unchanged
|
|
191
191
|
|
|
192
192
|
Uninstall options:
|
|
@@ -203,14 +203,14 @@ General options:
|
|
|
203
203
|
--help, -h Show this help
|
|
204
204
|
|
|
205
205
|
Examples:
|
|
206
|
-
npx @mearl/setup
|
|
207
|
-
npx @mearl/setup --cloud
|
|
208
|
-
npx @mearl/setup --local --cloud
|
|
209
|
-
npx @mearl/setup update
|
|
210
|
-
npx @mearl/setup uninstall --full
|
|
211
|
-
npx @mearl/setup plugin uninstall yuque
|
|
212
|
-
npx @mearl/setup provider install @ali/mearl-provider-brow
|
|
213
|
-
npx @mearl/setup extension --full`;
|
|
206
|
+
npx @mearl/setup@2
|
|
207
|
+
npx @mearl/setup@2 --cloud
|
|
208
|
+
npx @mearl/setup@2 --local --cloud
|
|
209
|
+
npx @mearl/setup@2 update
|
|
210
|
+
npx @mearl/setup@2 uninstall --full
|
|
211
|
+
npx @mearl/setup@2 plugin uninstall yuque
|
|
212
|
+
npx @mearl/setup@2 provider install @ali/mearl-provider-brow
|
|
213
|
+
npx @mearl/setup@2 extension --full`;
|
|
214
214
|
console.log(output);
|
|
215
215
|
}
|
|
216
216
|
export async function main(argv = process.argv.slice(2), interactiveTerminal = process.stdin.isTTY === true && process.stdout.isTTY === true, dependencies = {}) {
|
|
@@ -220,7 +220,7 @@ export async function main(argv = process.argv.slice(2), interactiveTerminal = p
|
|
|
220
220
|
}
|
|
221
221
|
catch (error) {
|
|
222
222
|
console.error(error instanceof Error ? error.message : String(error));
|
|
223
|
-
console.error('Run "npx @mearl/setup --help" for usage.');
|
|
223
|
+
console.error('Run "npx @mearl/setup@2 --help" for usage.');
|
|
224
224
|
return 2;
|
|
225
225
|
}
|
|
226
226
|
if (parsed.help) {
|
|
@@ -325,11 +325,11 @@ export async function main(argv = process.argv.slice(2), interactiveTerminal = p
|
|
|
325
325
|
if (result.cdpError) {
|
|
326
326
|
console.error(`CDP installation failed: ${result.cdpError}`);
|
|
327
327
|
if (isUnsupportedCdpMethodError(result.cdpError)) {
|
|
328
|
-
console.error('This Chrome version does not support installing extensions through CDP. Update Chrome to version 145 or later, then rerun: npx @mearl/setup extension');
|
|
328
|
+
console.error('This Chrome version does not support installing extensions through CDP. Update Chrome to version 145 or later, then rerun: npx @mearl/setup@2 extension');
|
|
329
329
|
extensionFailureIsTerminal = true;
|
|
330
330
|
}
|
|
331
331
|
else {
|
|
332
|
-
console.error('Open chrome://inspect/#remote-debugging, enable remote debugging, approve the connection, then rerun: npx @mearl/setup extension');
|
|
332
|
+
console.error('Open chrome://inspect/#remote-debugging, enable remote debugging, approve the connection, then rerun: npx @mearl/setup@2 extension');
|
|
333
333
|
extensionFailureIsTerminal = parsed.yes;
|
|
334
334
|
}
|
|
335
335
|
}
|
package/dist/lifecycle.js
CHANGED
|
@@ -79,7 +79,7 @@ async function runLifecycleCommand(runner, command, args, env, label, writeLine,
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
async function runPackageOperation(installation, operation, packages, targetLine, runner, env, label, writeLine) {
|
|
82
|
-
const command = buildGlobalPackageCommand(installation, operation, packages, targetLine);
|
|
82
|
+
const command = buildGlobalPackageCommand(installation, operation, packages, targetLine ?? '2.x');
|
|
83
83
|
writeLine(`${label}: ${command.manager}`);
|
|
84
84
|
const result = await runLifecycleCommand(runner, command.command, command.args, operation === 'uninstall'
|
|
85
85
|
? env
|
package/dist/plugin.js
CHANGED
|
@@ -4,7 +4,7 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'nod
|
|
|
4
4
|
import { assertPluginName, findPluginDirectoryEntry, findOfficialPlugin, findPluginEntry, findPluginRegistration, listPluginNames, loadPlugin, OFFICIAL_PLUGIN_MANAGER, registerPlugin, resolvePluginEntry, unregisterPlugin, } from '@mearl/client/plugin';
|
|
5
5
|
import { ensurePluginRuntime } from './pluginRuntime.js';
|
|
6
6
|
import { resolveAliSkillsInvocation, stripAnsi } from './aliSkills.js';
|
|
7
|
-
import { findExecutable, prependNodePath, runCommand, } from '@mearl/daemon-core';
|
|
7
|
+
import { findExecutable, npmExecEnvironment, prependNodePath, runCommand, } from '@mearl/daemon-core';
|
|
8
8
|
const registrationContext = {
|
|
9
9
|
options: {},
|
|
10
10
|
invoke: async () => {
|
|
@@ -241,7 +241,7 @@ export async function installPlugins(args, runner = runCommand, options = {}) {
|
|
|
241
241
|
throw new Error('未找到 npx,请检查 Node.js 安装。');
|
|
242
242
|
// 固定共享安装模式,确保成功结果指向 ~/.agents/skills 中的入口。
|
|
243
243
|
const installed = await runner(npx, ['-y', 'ali-skills', 'add', ...args, '--global', '--install-mode', 'symlink'], {
|
|
244
|
-
env: prependNodePath(),
|
|
244
|
+
env: npmExecEnvironment(prependNodePath()),
|
|
245
245
|
tee: true,
|
|
246
246
|
});
|
|
247
247
|
if (installed.code !== 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearl/setup",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "One-shot environment setup and configuration for Mearl",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -56,18 +56,18 @@
|
|
|
56
56
|
],
|
|
57
57
|
"license": "ISC",
|
|
58
58
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
59
|
+
"node": ">=20.18.0"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"registry": "https://registry.npmjs.org"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"commander": "^
|
|
65
|
+
"commander": "^14.0.3",
|
|
66
66
|
"extract-zip": "^2.0.1",
|
|
67
67
|
"ws": "^8.18.3",
|
|
68
|
-
"@mearl/client": "2.
|
|
69
|
-
"@mearl/provider": "2.
|
|
70
|
-
"@mearl/daemon-core": "2.
|
|
68
|
+
"@mearl/client": "2.23.0",
|
|
69
|
+
"@mearl/provider": "2.23.0",
|
|
70
|
+
"@mearl/daemon-core": "2.23.0"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/node": "^24.9.1",
|