agent-browser 0.3.4 → 0.3.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/bin/agent-browser +13 -1
- package/package.json +1 -1
package/bin/agent-browser
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
# agent-browser CLI wrapper
|
|
3
3
|
# Tries native binary first, falls back to Node.js
|
|
4
4
|
|
|
5
|
+
# Resolve symlinks to find real script location
|
|
6
|
+
SCRIPT="$0"
|
|
7
|
+
while [ -L "$SCRIPT" ]; do
|
|
8
|
+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
9
|
+
SCRIPT="$(readlink "$SCRIPT")"
|
|
10
|
+
# Handle relative symlinks
|
|
11
|
+
case "$SCRIPT" in
|
|
12
|
+
/*) ;;
|
|
13
|
+
*) SCRIPT="$SCRIPT_DIR/$SCRIPT" ;;
|
|
14
|
+
esac
|
|
15
|
+
done
|
|
16
|
+
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)"
|
|
17
|
+
|
|
5
18
|
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
6
19
|
ARCH=$(uname -m)
|
|
7
20
|
|
|
@@ -16,7 +29,6 @@ case "$ARCH" in
|
|
|
16
29
|
aarch64|arm64) ARCH="arm64" ;;
|
|
17
30
|
esac
|
|
18
31
|
|
|
19
|
-
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
20
32
|
BINARY="$SCRIPT_DIR/agent-browser-${OS}-${ARCH}"
|
|
21
33
|
|
|
22
34
|
# Try native binary if it exists
|