@lujoai/lujo-mcp 0.6.7 → 0.6.9

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.
Files changed (3) hide show
  1. package/bin/check.js +19 -0
  2. package/bin/cli.js +11 -0
  3. package/package.json +4 -4
package/bin/check.js CHANGED
@@ -12,6 +12,15 @@ const arch = process.arch === 'x64' ? 'x64' : process.arch === 'arm64' ? 'arm64'
12
12
  const pkg = `lujo-mcp-${platform}-${arch}`;
13
13
  const binFile = `lujo-mcp-server${process.platform === 'win32' ? '.exe' : ''}`;
14
14
 
15
+ // FIX: P2-F6 —— 仅 CI 实际构建的平台有官方预编译包:win32-x64 / linux-x64 / osx-arm64。
16
+ // 其他平台(如 linux-arm64、osx-x64 用户)上 optionalDependencies 全部跳过属预期行为,
17
+ // 安装本应成功。此前对任何平台缺失都 exit 1 并指引"安装一个不存在的平台包",导致
18
+ // 该平台 install 硬失败 + 报错指引装不到东西。这里先把当前平台分到两个分支:
19
+ // - 受支持平台 → 沿用严格的"缺失/版本不匹配"校验;
20
+ // - 不受支持平台 → 给出清晰说明并以 0 退出(不阻断 npm install)。
21
+ // 支持集需与 npm/scripts/gen-platform-packages.js 的平台数组保持同步。
22
+ const supportedPlatforms = new Set(['win32-x64', 'linux-x64', 'osx-arm64']);
23
+
15
24
  function pkgVersionAt(pkgDir) {
16
25
  try {
17
26
  return JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf8')).version || null;
@@ -27,6 +36,16 @@ try {
27
36
  metaV = null;
28
37
  }
29
38
 
39
+ // 非受支持平台:无官方预编译包属预期,不阻断安装,仅提示源码途径。
40
+ if (!supportedPlatforms.has(pkg)) {
41
+ console.error(
42
+ `[lujo-mcp-server] 当前平台(${pkg})暂无官方预编译二进制。\n` +
43
+ '官方预编译包仅支持: win32-x64, linux-x64, osx-arm64。\n' +
44
+ '请改用 Python 源码方式运行(见项目 README),或在 GitHub issues 反馈需要支持该平台。'
45
+ );
46
+ process.exit(0);
47
+ }
48
+
30
49
  let exe = null;
31
50
  const mismatches = [];
32
51
  let dir = __dirname;
package/bin/cli.js CHANGED
@@ -56,6 +56,17 @@ function binaryNameFor(pkg) {
56
56
 
57
57
  function run() {
58
58
  const pkg = platformPackageName();
59
+ // FIX: P2-F6 —— 与 check.js 一致:非 CI 构建平台无官方预编译包,给出清晰指引而非
60
+ // 提示安装一个不存在的平台包。支持集需与 gen-platform-packages.js 平台数组保持同步。
61
+ const supportedPlatforms = new Set(['win32-x64', 'linux-x64', 'osx-arm64']);
62
+ if (!supportedPlatforms.has(pkg)) {
63
+ console.error(
64
+ `[lujo-mcp-server] 当前平台(${pkg})暂无官方预编译二进制。\n` +
65
+ '官方预编译包仅支持: win32-x64, linux-x64, osx-arm64。\n' +
66
+ '请改用 Python 源码方式运行(见项目 README),或在 GitHub issues 反馈需要支持该平台。'
67
+ );
68
+ process.exit(1);
69
+ }
59
70
  const bin = binaryNameFor(pkg);
60
71
  if (!bin) {
61
72
  console.error(`[lujo-mcp-server] could not locate the ${pkg} binary.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lujoai/lujo-mcp",
3
- "version": "0.6.7",
3
+ "version": "0.6.9",
4
4
  "description": "Lujo-MCP ? MCP Runtime Debugging Context Server for AI coding agents. Gives Claude, Cursor, Trae and any MCP-compatible client real runtime debugging context: browser errors, console logs, network failures, UI interaction traces and session context. Zero-config, install via npm.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -42,8 +42,8 @@
42
42
  "prepublishOnly": "node ./scripts/check-clean-bin.js"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@lujoai/lujo-mcp-win32-x64": "0.6.7",
46
- "@lujoai/lujo-mcp-linux-x64": "0.6.7",
47
- "@lujoai/lujo-mcp-osx-arm64": "0.6.7"
45
+ "@lujoai/lujo-mcp-win32-x64": "0.6.9",
46
+ "@lujoai/lujo-mcp-linux-x64": "0.6.9",
47
+ "@lujoai/lujo-mcp-osx-arm64": "0.6.9"
48
48
  }
49
49
  }