@@ -28,6 +28,7 @@ ARG_BOUNDARY_LOG_LEVEL=${ARG_BOUNDARY_LOG_LEVEL:-"WARN"}
2828ARG_BOUNDARY_PROXY_PORT=${ARG_BOUNDARY_PROXY_PORT:- " 8087" }
2929ARG_ENABLE_BOUNDARY_PPROF=${ARG_ENABLE_BOUNDARY_PPROF:- false}
3030ARG_BOUNDARY_PPROF_PORT=${ARG_BOUNDARY_PPROF_PORT:- " 6067" }
31+ ARG_COMPILE_FROM_SOURCE=${ARG_COMPILE_FROM_SOURCE:- false}
3132ARG_CODER_HOST=${ARG_CODER_HOST:- }
3233
3334echo " --------------------------------"
@@ -45,6 +46,7 @@ printf "ARG_BOUNDARY_VERSION: %s\n" "$ARG_BOUNDARY_VERSION"
4546printf " ARG_BOUNDARY_LOG_DIR: %s\n" " $ARG_BOUNDARY_LOG_DIR "
4647printf " ARG_BOUNDARY_LOG_LEVEL: %s\n" " $ARG_BOUNDARY_LOG_LEVEL "
4748printf " ARG_BOUNDARY_PROXY_PORT: %s\n" " $ARG_BOUNDARY_PROXY_PORT "
49+ printf " ARG_COMPILE_FROM_SOURCE: %s\n" " $ARG_COMPILE_FROM_SOURCE "
4850printf " ARG_CODER_HOST: %s\n" " $ARG_CODER_HOST "
4951
5052echo " --------------------------------"
@@ -63,11 +65,25 @@ case $session_cleanup_exit_code in
6365esac
6466
6567function install_boundary() {
66- # Install boundary from public github repo
67- git clone https://github.com/coder/boundary
68- cd boundary
69- git checkout $ARG_BOUNDARY_VERSION
70- go install ./cmd/...
68+ if [ " ${ARG_COMPILE_FROM_SOURCE:- false} " = " true" ]; then
69+ # Install boundary by compiling from source
70+ echo " Compiling boundary from source (version: $ARG_BOUNDARY_VERSION )"
71+ git clone https://github.com/coder/boundary.git
72+ cd boundary
73+ git checkout " $ARG_BOUNDARY_VERSION "
74+
75+ # Build the binary
76+ make build
77+
78+ # Install binary and wrapper script (optional)
79+ sudo cp boundary /usr/local/bin/
80+ sudo cp scripts/boundary-wrapper.sh /usr/local/bin/boundary-run
81+ sudo chmod +x /usr/local/bin/boundary-run
82+ else
83+ # Install boundary using official install script
84+ echo " Installing boundary using official install script (version: $ARG_BOUNDARY_VERSION )"
85+ curl -fsSL https://raw.githubusercontent.com/coder/boundary/main/install.sh | bash -s -- --version " $ARG_BOUNDARY_VERSION "
86+ fi
7187}
7288
7389function validate_claude_installation() {
@@ -209,9 +225,8 @@ function start_agentapi() {
209225 BOUNDARY_ARGS+=(--pprof-port ${ARG_BOUNDARY_PPROF_PORT} )
210226 fi
211227
212- agentapi server --allowed-hosts=" *" --type claude --term-width 67 --term-height 1190 -- \
213- sudo -E env PATH=$PATH setpriv --reuid=$( id -u) --regid=$( id -g) --clear-groups \
214- --inh-caps=+net_admin --ambient-caps=+net_admin --bounding-set=+net_admin boundary " ${BOUNDARY_ARGS[@]} " -- \
228+ agentapi server --type claude --term-width 67 --term-height 1190 -- \
229+ boundary-run " ${BOUNDARY_ARGS[@]} " -- \
215230 claude " ${ARGS[@]} "
216231 else
217232 agentapi server --type claude --term-width 67 --term-height 1190 -- claude " ${ARGS[@]} "
0 commit comments