Skip to content

Commit c7cfca3

Browse files
committed
Add agent context via --system-prompt in connect.sh
1 parent 45f938c commit c7cfca3

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

demo/connect.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,19 +206,30 @@ run_prompt() {
206206
PROXY_URL="$(<"$proxy_file")"
207207
WORK_DIR="${WORK_DIR:-$STATE_DIR/work}"
208208
mkdir -p "$WORK_DIR"
209-
CLAUDE_CURL_PERMISSIONS=(
209+
CLAUDE_ARGS=(
210210
--allowedTools "Bash(curl *)"
211+
--system-prompt "You have access to two internal services via HTTPS:
212+
213+
- docstore (https://docstore) - document storage
214+
- GET /health - health check
215+
- GET /documents - list available documents
216+
217+
- messaging (https://messaging) - internal messaging (read-only)
218+
- GET /health - health check
219+
- GET /messages - list recent messages
220+
221+
Use the Bash tool with curl to interact with these services."
211222
)
212223

213224
if [[ -f "$STATE_DIR/claude_started" ]]; then
214225
(
215226
cd "$WORK_DIR"
216-
HTTP_PROXY="$PROXY_URL" HTTPS_PROXY="$PROXY_URL" CURL_CA_BUNDLE="${CURL_CA_BUNDLE:-}" SSL_CERT_FILE="${SSL_CERT_FILE:-}" claude "${CLAUDE_CURL_PERMISSIONS[@]}" -c -p "$PROMPT"
227+
HTTP_PROXY="$PROXY_URL" HTTPS_PROXY="$PROXY_URL" CURL_CA_BUNDLE="${CURL_CA_BUNDLE:-}" SSL_CERT_FILE="${SSL_CERT_FILE:-}" claude "${CLAUDE_ARGS[@]}" -c -p "$PROMPT"
217228
)
218229
else
219230
(
220231
cd "$WORK_DIR"
221-
HTTP_PROXY="$PROXY_URL" HTTPS_PROXY="$PROXY_URL" CURL_CA_BUNDLE="${CURL_CA_BUNDLE:-}" SSL_CERT_FILE="${SSL_CERT_FILE:-}" claude "${CLAUDE_CURL_PERMISSIONS[@]}" -p "$PROMPT"
232+
HTTP_PROXY="$PROXY_URL" HTTPS_PROXY="$PROXY_URL" CURL_CA_BUNDLE="${CURL_CA_BUNDLE:-}" SSL_CERT_FILE="${SSL_CERT_FILE:-}" claude "${CLAUDE_ARGS[@]}" -p "$PROMPT"
222233
)
223234
: > "$STATE_DIR/claude_started"
224235
fi

0 commit comments

Comments
 (0)