mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-23 10:15:57 +00:00
Complete rewrite of the support bot to stateless architecture: - State derived from group composition + chat history (survives restarts) - Card dashboard in team group with live status, preview, /join commands - Two-profile architecture (main + Grok) with profileMutex serialization - Grok join race condition fix via bufferedGrokInvitations - Card preview: newest-first truncation, newline sanitization, sender prefixes - Best-effort startup (invite link, group profile update) - Team group preferences: directMessages, fullDelete, commands - 122 tests across 27 suites
29 lines
844 B
Bash
Executable File
29 lines
844 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$SCRIPT_DIR"
|
|
|
|
# --- Required ---
|
|
# GROK_API_KEY xAI API key (env var)
|
|
# --team-group Team group display name
|
|
|
|
# --- Optional ---
|
|
# --db-prefix Database file prefix (default: ./data/simplex)
|
|
# --auto-add-team-members (-a) Comma-separated ID:name pairs (e.g. 1:Alice,2:Bob)
|
|
# --group-links Public group link(s) shown in welcome message
|
|
# --timezone IANA timezone for weekend detection (default: UTC)
|
|
# --complete-hours Hours of inactivity before auto-complete (default: 3)
|
|
|
|
if [ -z "${GROK_API_KEY:-}" ]; then
|
|
echo "Error: GROK_API_KEY environment variable is required" >&2
|
|
exit 1
|
|
fi
|
|
|
|
if [ ! -f dist/index.js ]; then
|
|
echo "Error: dist/index.js not found. Run ./build.sh first." >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec node dist/index.js "$@"
|