slimbrowser-mcp 0.1.6 → 0.1.8
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,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "slimbrowser-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "npx bootstrap launcher for slimbrowser-mcp",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"README.md",
|
|
10
|
+
"prebuilt",
|
|
10
11
|
"scripts/slimbrowser-mcp-bootstrap.sh",
|
|
11
12
|
"scripts/slimbrowser-mcp-npx.js"
|
|
12
13
|
],
|
|
Binary file
|
|
@@ -5,19 +5,39 @@ ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
|
5
5
|
INSTALL_ROOT="${SLIMBROWSER_MCP_INSTALL_ROOT:-$HOME/.slimbrowser-mcp}"
|
|
6
6
|
BIN_PATH="$INSTALL_ROOT/bin/slimbrowser-mcp"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
detect_target() {
|
|
9
|
+
local os arch
|
|
10
|
+
os="$(uname -s)"
|
|
11
|
+
arch="$(uname -m)"
|
|
12
|
+
case "${os}:${arch}" in
|
|
13
|
+
Darwin:arm64) echo "darwin-arm64" ;;
|
|
14
|
+
Darwin:x86_64) echo "darwin-x64" ;;
|
|
15
|
+
Linux:x86_64) echo "linux-x64" ;;
|
|
16
|
+
Linux:aarch64) echo "linux-arm64" ;;
|
|
17
|
+
*) return 1 ;;
|
|
18
|
+
esac
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
install_from_prebuilt() {
|
|
22
|
+
local target source
|
|
23
|
+
target="$(detect_target)" || return 1
|
|
24
|
+
source="$ROOT_DIR/prebuilt/$target/slimbrowser-mcp"
|
|
25
|
+
if [[ ! -x "$source" ]]; then
|
|
26
|
+
return 1
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
mkdir -p "$INSTALL_ROOT/bin"
|
|
30
|
+
cp "$source" "$BIN_PATH"
|
|
31
|
+
chmod +x "$BIN_PATH"
|
|
32
|
+
}
|
|
12
33
|
|
|
13
34
|
if [[ ! -x "$BIN_PATH" ]]; then
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
--root "$INSTALL_ROOT" >/dev/null
|
|
35
|
+
if ! install_from_prebuilt; then
|
|
36
|
+
echo "error: no bundled slimbrowser-mcp binary for this platform." >&2
|
|
37
|
+
echo "set SLIMBROWSER_MCP_INSTALL_ROOT to choose install location." >&2
|
|
38
|
+
echo "supported prebuilt targets in this package are under prebuilt/<target>/." >&2
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
21
41
|
fi
|
|
22
42
|
|
|
23
43
|
exec "$BIN_PATH" "$@"
|