@@ -52,7 +52,7 @@ prompt_ssh() {
52
52
# Write prompt to a file in the workspace
53
53
ssh \
54
54
-F /tmp/coder-ssh.config \
55
- " ${WORKSPACE_NAME} .coder" \
55
+ " ${WORKSPACE_NAME} .coder" \
56
56
-- \
57
57
" cat > /tmp/prompt.txt" <<< " ${PROMPT}"
58
58
@@ -63,7 +63,7 @@ prompt_ssh() {
63
63
" ${WORKSPACE_NAME} .coder" \
64
64
-- \
65
65
" cat /tmp/prompt.txt |\"\$ {HOME}\" /.local/bin/claude --print --verbose --output-format=stream-json"
66
- exit 0
66
+ exit 0
67
67
}
68
68
69
69
prompt_agentapi () {
@@ -94,12 +94,12 @@ prompt_agentapi() {
94
94
--show-error \
95
95
--silent \
96
96
" ${CODER_URL} /@${username} /${WORKSPACE_NAME} /apps/${AGENTAPI_SLUG} /message" | jq -r' .ok' )
97
- if [[" ${response} " != " true" ]]; then
98
- echo " Failed to send prompt"
99
- exit 1
100
- fi
97
+ if [[" ${response} " != " true" ]]; then
98
+ echo " Failed to send prompt"
99
+ exit 1
100
+ fi
101
101
102
- wait
102
+ wait
103
103
}
104
104
105
105
wait () {
@@ -119,15 +119,15 @@ wait() {
119
119
120
120
for attempt in {1..600}; do
121
121
response=$( curl \
122
- --data-raw" ${payload} " \
123
- --fail \
124
- --header" Content-Type: application/json" \
125
- --header" Coder-Session-Token:${CODER_SESSION_TOKEN} " \
126
- --location \
127
- --request GET \
128
- --show-error \
129
- --silent \
130
- " ${CODER_URL} /@${username} /${WORKSPACE_NAME} /apps/agentapi/status" | jq -r' .status' )
122
+ --data-raw" ${payload} " \
123
+ --fail \
124
+ --header" Content-Type: application/json" \
125
+ --header" Coder-Session-Token:${CODER_SESSION_TOKEN} " \
126
+ --location \
127
+ --request GET \
128
+ --show-error \
129
+ --silent \
130
+ " ${CODER_URL} /@${username} /${WORKSPACE_NAME} /apps/agentapi/status" | jq -r' .status' )
131
131
if [[" ${response} " == " stable" ]]; then
132
132
echo " AgentAPI stable"
133
133
break