Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Harden Cursor Cloud setup reuse

shukieshah6ddd84314d28
diff --git a/.cursor/install.sh b/.cursor/install.sh
index ad917856..d0a50613 100755
--- a/.cursor/install.sh
+++ b/.cursor/install.sh
@@ -27,17 +27,24 @@ install_from_release() {
tar -xzf "$BEACON_HOME/${archive}" -C "$BEACON_BIN_DIR"
}
+go_is_compatible() {
+ local go_binary="$1"
+ local current_version
+ current_version="$("$go_binary" version 2>/dev/null | awk '{print $3}')"
+ [[ "$current_version" =~ ^go1\.([0-9]+) ]] && [ "${BASH_REMATCH[1]}" -ge 24 ]
+}
+
install_go() {
local bundled_go="$BEACON_HOME/go-toolchain/go/bin/go"
- if [ -x "$bundled_go" ]; then
+ if [ -x "$bundled_go" ] && go_is_compatible "$bundled_go"; then
export PATH="$(dirname "$bundled_go"):$PATH"
return
fi
if command -v go >/dev/null 2>&1; then
- local current_version
- current_version="$(go version 2>/dev/null | awk '{print $3}')"
- if [[ "$current_version" =~ ^go1\.([0-9]+) ]] && [ "${BASH_REMATCH[1]}" -ge 24 ]; then
+ local system_go
+ system_go="$(command -v go)"
+ if go_is_compatible "$system_go"; then
return
fi
fi
diff --git a/.cursor/start.sh b/.cursor/start.sh
index 25b9b55a..3578b488 100755
--- a/.cursor/start.sh
+++ b/.cursor/start.sh
@@ -6,7 +6,9 @@ BEACON_LOG_PATH="${BEACON_CLOUD_LOG_PATH:-$BEACON_HOME/runtime.jsonl}"
mkdir -p "$(dirname "$BEACON_LOG_PATH")"
-case "${BEACON_CLOUD_UPLOAD:-gcs}" in
+BEACON_CLOUD_UPLOAD_NORMALIZED="$(printf '%s' "${BEACON_CLOUD_UPLOAD:-gcs}" | tr '[:upper:]' '[:lower:]')"
+
+case "$BEACON_CLOUD_UPLOAD_NORMALIZED" in
s3)
if [ -n "${BEACON_CLOUD_S3_BUCKET:-}" ] &&
[ -n "${AWS_ACCESS_KEY_ID:-}" ] &&
@@ -16,16 +18,16 @@ case "${BEACON_CLOUD_UPLOAD:-gcs}" in
echo "Beacon Cloud S3 forwarding is not active; set the S3 bucket, region, and AWS credentials to enable uploads."
fi
;;
- gcs)
+ *)
+ if [ "$BEACON_CLOUD_UPLOAD_NORMALIZED" != "gcs" ]; then
+ echo "Beacon Cloud upload destination '$BEACON_CLOUD_UPLOAD' is unknown; using the GCS fallback."
+ fi
if [ -n "${BEACON_CLOUD_GCS_BUCKET:-}" ] && [ -n "${BEACON_CLOUD_GCS_CREDENTIALS_B64:-}" ]; then
echo "Beacon Cloud GCS forwarding is configured for bucket: $BEACON_CLOUD_GCS_BUCKET"
else
echo "Beacon Cloud GCS forwarding is not active; set the GCS bucket and credentials to enable uploads."
fi
;;
- *)
- echo "Beacon Cloud forwarding has unsupported BEACON_CLOUD_UPLOAD=${BEACON_CLOUD_UPLOAD}."
- ;;
esac
echo "Beacon runtime log path: $BEACON_LOG_PATH"