3688d732c0
Memind CI / Test, build, and release guards (push) Successful in 6m43s
Add prod runner and LaunchAgent installer so Tang chatBridge toggle can reach a live OpenAI-compatible bridge after env enablement. Co-authored-by: Cursor <cursoragent@cursor.com>
34 lines
730 B
Bash
Executable File
34 lines
730 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
|
|
if [[ ! -f "${ROOT}/.env" ]]; then
|
|
echo "[cursor-chat-bridge] missing .env in ${ROOT}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
cd "${ROOT}"
|
|
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
source "${ROOT}/.env"
|
|
set +a
|
|
|
|
export NODE_ENV=production
|
|
export MEMIND_CURSOR_CHAT_BRIDGE_ENTRYPOINT=1
|
|
export MEMIND_CURSOR_CHAT_BRIDGE_PORT="${MEMIND_CURSOR_CHAT_BRIDGE_PORT:-18040}"
|
|
|
|
NODE_BIN="${NODE_BIN:-/opt/homebrew/opt/node@24/bin/node}"
|
|
if [[ ! -x "${NODE_BIN}" ]]; then
|
|
NODE_BIN="$(command -v node)"
|
|
fi
|
|
|
|
BRIDGE="${ROOT}/cursor-openai-bridge.mjs"
|
|
if [[ ! -f "${BRIDGE}" ]]; then
|
|
echo "[cursor-chat-bridge] bundle not found: ${BRIDGE}" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec "${NODE_BIN}" "${BRIDGE}"
|