@tedbrain/vlink 0.1.89 → 0.1.91
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/binaries.json +8 -8
- package/mcp-installer.js +16 -5
- package/package.json +1 -1
package/binaries.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
2
|
+
"version": "0.1.91",
|
|
3
3
|
"binaries": {
|
|
4
|
-
"linux-x86_64": "
|
|
5
|
-
"linux-x86_64-glibc2.17": "
|
|
6
|
-
"linux-aarch64": "
|
|
7
|
-
"macos-x86_64": "
|
|
8
|
-
"macos-aarch64": "
|
|
9
|
-
"windows-x86_64.exe": "
|
|
10
|
-
"windows-aarch64.exe": "
|
|
4
|
+
"linux-x86_64": "00b9c71c4462518fc29b6abdddb82db44bc6d689e0076c5212dc72240d4ae608",
|
|
5
|
+
"linux-x86_64-glibc2.17": "3c3c2b0b9d267c6bff7ae4d64fea0c018958877ca062649710c4445de5263fc6",
|
|
6
|
+
"linux-aarch64": "7a769455d445e7a32316f53eaeceb48063a5ccade7da78d74dfc284607de9deb",
|
|
7
|
+
"macos-x86_64": "a847af3beffd546da25d3bf49c559e87d606bafb050d8b8cf373019dbb118c74",
|
|
8
|
+
"macos-aarch64": "2bc8033806b7d56b0ccaa4e5c4ae848436d405227c903838f944d531d59fc31b",
|
|
9
|
+
"windows-x86_64.exe": "85a1e09e72ae54f10a5b65825fd6d220d530f7d7b7b9e76eacbf7a43bfb0221f",
|
|
10
|
+
"windows-aarch64.exe": "9c469c039da3234323d5b022b4849163ec7e902a60bb954516f181ce2799ea65"
|
|
11
11
|
}
|
|
12
12
|
}
|
package/mcp-installer.js
CHANGED
|
@@ -4,7 +4,7 @@ const path = require('path');
|
|
|
4
4
|
const readline = require('readline');
|
|
5
5
|
const { spawnSync } = require('child_process');
|
|
6
6
|
const {
|
|
7
|
-
defaultInstallDir, findOnPath, isExecutableFile, isVlinkWrapper, VlinkSetupError
|
|
7
|
+
defaultInstallDir, findOnPath, isExecutableFile, isVlinkWrapper, runInstaller, VlinkSetupError
|
|
8
8
|
} = require('./installer');
|
|
9
9
|
|
|
10
10
|
const RETRY_HINT = '请手动运行 vlink update --apply,完成后重新执行 MCP 安装。';
|
|
@@ -69,9 +69,20 @@ async function runMcpInstaller(args, options = {}) {
|
|
|
69
69
|
binary = fallback;
|
|
70
70
|
}
|
|
71
71
|
if (!binary) {
|
|
72
|
-
|
|
73
|
-
'
|
|
74
|
-
|
|
72
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
73
|
+
output.write('Usage: npx -y @tedbrain/vlink@latest mcp install [codex|claude] [--proxy-url <URL>]\n' +
|
|
74
|
+
'安装原生 vlink、验证邀请码并注册 MCP;省略 Agent 时交互选择。\n');
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
output.write('[TedBrain] 正在安装原生 vlink,随后继续 MCP 配置,无需重新打开终端。\n');
|
|
78
|
+
const installed = await (options.runInstaller || runInstaller)({
|
|
79
|
+
...options, env, platform, output, skipSetup: true
|
|
80
|
+
});
|
|
81
|
+
binary = installed?.vlinkPath;
|
|
82
|
+
if (typeof binary !== 'string' || !path.isAbsolute(binary) ||
|
|
83
|
+
!isExecutableFile(binary, platform) || isVlinkWrapper(binary)) {
|
|
84
|
+
throw new VlinkSetupError('原生 vlink 安装未返回有效的程序路径,未安装 MCP。');
|
|
85
|
+
}
|
|
75
86
|
}
|
|
76
87
|
binary = path.resolve(binary);
|
|
77
88
|
|
|
@@ -148,7 +159,7 @@ async function runMcpInstaller(args, options = {}) {
|
|
|
148
159
|
}
|
|
149
160
|
}
|
|
150
161
|
output.write(`[TedBrain] 使用 ${binary} 安装 MCP\n`);
|
|
151
|
-
execute(binary, ['mcp', 'install', ...args], false);
|
|
162
|
+
execute(binary, ['mcp', 'install', ...args, ...(args.includes('--login') ? [] : ['--login'])], false);
|
|
152
163
|
}
|
|
153
164
|
|
|
154
165
|
module.exports = { runMcpInstaller, confirmUpgrade };
|
package/package.json
CHANGED