fix: cross-platform support + auto token from state.vscdb

- User-Agent now matches actual OS (macOS/Windows/Linux)
- grep -oP replaced with grep -oE for macOS BSD compat
- Port-killer gated with cfg(unix)/cfg(windows)
- zg binary: macOS uses launchctl, Windows uses schtasks
- Data dir mismatch fixed in mitm-redirect.sh
- Windows setup-windows.ps1 ProjectDir fixed
- README: token path, prerequisites updated
- setup-linux.sh: pre-flight dependency checks
- OAuth token auto-read from Antigravity state.vscdb
- Version bump to 1.0.1
This commit is contained in:
Nikketryhard
2026-02-18 04:09:41 -06:00
parent efdb98e6f0
commit 134126358f
12 changed files with 397 additions and 70 deletions

View File

@@ -7,6 +7,17 @@ set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
# ── 0. Dependency check ──
MISSING=()
for cmd in cargo curl jq gcc sudo iptables; do
command -v "$cmd" &>/dev/null || MISSING+=("$cmd")
done
if [ ${#MISSING[@]} -gt 0 ]; then
echo "✗ Missing dependencies: ${MISSING[*]}"
echo " Install them first, then re-run this script."
exit 1
fi
# ── 1. System user for UID isolation ──
echo "→ Creating zerogravity-ls system user…"
if id -u zerogravity-ls &>/dev/null; then