Spaces:
Sleeping
Sleeping
Download scripts/start-agent-host.sh from cpuai/ahp-development-workstation: direct link, hf CLI and curl.
- Browser
- Download file 913 Bytes
-
https://huggingface.co/spaces/cpuai/ahp-development-workstation/resolve/main/scripts/start-agent-host.sh
- Command line
-
hf download hf://spaces/cpuai/ahp-development-workstation/scripts/start-agent-host.sh
-
curl -L -o start-agent-host.sh https://huggingface.co/spaces/cpuai/ahp-development-workstation/resolve/main/scripts/start-agent-host.sh
913 Bytes
| set -euo pipefail | |
| # Some CLI versions change their option names. Keep the upstream AHP private. | |
| help="$(/usr/local/bin/code agent host --help 2>&1 || true)" | |
| args=(agent host) | |
| if grep -q -- '--host' <<<"$help"; then args+=(--host 127.0.0.1); fi | |
| if grep -q -- '--port' <<<"$help"; then args+=(--port 7242); fi | |
| if grep -q -- '--without-connection-token' <<<"$help"; then | |
| args+=(--without-connection-token) | |
| else | |
| echo >&2 "FATAL: VS Code CLI cannot disable its connection token for private loopback AHP; bridge cannot connect using configured anonymous local WebSocket." | |
| exit 42 | |
| fi | |
| if grep -q -- '--server-data-dir' <<<"$help"; then args+=(--server-data-dir /home/coder/data/agent-host); fi | |
| if grep -q -- '--foreground' <<<"$help"; then args+=(--foreground); else echo >&2 "FATAL: Agent Host must run in foreground under supervisord."; exit 43; fi | |
| exec /usr/local/bin/code "${args[@]}" | |