consult-llm-mcp 2.5.4 → 2.5.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "consult-llm-mcp",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "description": "MCP server for consulting powerful AI models",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,10 +16,6 @@
16
16
  },
17
17
  "files": [
18
18
  "run.sh",
19
- "consult-llm-mcp-darwin-arm64",
20
- "consult-llm-mcp-darwin-x64",
21
- "consult-llm-mcp-linux-x64",
22
- "consult-llm-mcp-linux-arm64",
23
19
  "README.md",
24
20
  "CHANGELOG.md"
25
21
  ],
@@ -33,5 +29,11 @@
33
29
  "gemini",
34
30
  "llm",
35
31
  "ai"
36
- ]
32
+ ],
33
+ "optionalDependencies": {
34
+ "consult-llm-mcp-darwin-arm64": "2.5.5",
35
+ "consult-llm-mcp-darwin-x64": "2.5.5",
36
+ "consult-llm-mcp-linux-x64": "2.5.5",
37
+ "consult-llm-mcp-linux-arm64": "2.5.5"
38
+ }
37
39
  }
package/run.sh CHANGED
@@ -21,16 +21,45 @@ OS="$(uname -s)"
21
21
  ARCH="$(uname -m)"
22
22
 
23
23
  case "$OS:$ARCH" in
24
- Darwin:arm64 | Darwin:aarch64) BIN="$DIR/consult-llm-mcp-darwin-arm64" ;;
25
- Darwin:x86_64) BIN="$DIR/consult-llm-mcp-darwin-x64" ;;
26
- Linux:x86_64 | Linux:amd64) BIN="$DIR/consult-llm-mcp-linux-x64" ;;
27
- Linux:aarch64 | Linux:arm64) BIN="$DIR/consult-llm-mcp-linux-arm64" ;;
24
+ Darwin:arm64 | Darwin:aarch64) PLATFORM="darwin-arm64" ;;
25
+ Darwin:x86_64) PLATFORM="darwin-x64" ;;
26
+ Linux:x86_64 | Linux:amd64) PLATFORM="linux-x64" ;;
27
+ Linux:aarch64 | Linux:arm64) PLATFORM="linux-arm64" ;;
28
28
  *)
29
29
  echo "consult-llm-mcp: unsupported platform: $OS $ARCH" >&2
30
30
  exit 1
31
31
  ;;
32
32
  esac
33
33
 
34
- # npm may strip executable bits on sidecar binaries during extraction
35
- [ -x "$BIN" ] || chmod +x "$BIN"
36
- exec "$BIN" "$@"
34
+ PKG_NAME="consult-llm-mcp-$PLATFORM"
35
+ BIN_NAME="consult-llm-mcp"
36
+
37
+ # Fast path: check common node_modules layouts
38
+ for candidate in \
39
+ "$DIR/../$PKG_NAME/$BIN_NAME" \
40
+ "$DIR/node_modules/$PKG_NAME/$BIN_NAME"; do
41
+ if [ -f "$candidate" ]; then
42
+ [ -x "$candidate" ] || chmod +x "$candidate" 2>/dev/null || true
43
+ exec "$candidate" "$@"
44
+ fi
45
+ done
46
+
47
+ # Fallback: use Node's require.resolve for non-standard layouts (pnpm, yarn pnp, etc.)
48
+ if command -v node >/dev/null 2>&1; then
49
+ BIN="$(PKG_NAME="$PKG_NAME" BIN_NAME="$BIN_NAME" SEARCH_DIR="$DIR" node -e "
50
+ try {
51
+ const p = require('path');
52
+ const pkg = require.resolve(process.env.PKG_NAME + '/package.json', { paths: [process.env.SEARCH_DIR] });
53
+ process.stdout.write(p.join(p.dirname(pkg), process.env.BIN_NAME));
54
+ } catch (e) {
55
+ process.exit(1);
56
+ }
57
+ " 2>/dev/null)" && [ -f "$BIN" ] && {
58
+ [ -x "$BIN" ] || chmod +x "$BIN" 2>/dev/null || true
59
+ exec "$BIN" "$@"
60
+ }
61
+ fi
62
+
63
+ echo "consult-llm-mcp: could not find platform binary package '$PKG_NAME'" >&2
64
+ echo "Ensure npm install was not run with --no-optional or --omit=optional." >&2
65
+ exit 1
Binary file
Binary file
Binary file
Binary file