Refactor Ralph session rotation with watchdog and stall detection (#170)

* Improve scroll-to-bottom UI and session status handling

* Enhance Ralph service with session rotation and watchdog

* Add tests for Ralph session rotation and cleanup

* Add Kasm Docker build workflow
This commit is contained in:
Chris Scott authored and GitHub committed 2026-03-24 17:36:35 -04:00
1 parent 4ad6c5fd25
commit 27352ea5cf
11 files changed
+502 -25

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
set -e
export PATH="/opt/bun/bin:/opt/opencode/bin:/usr/local/bin:$PATH"
export BUN_INSTALL="/opt/bun"
START_COMMAND="bun backend/src/index.ts"
WORK_DIR="/opt/opencode-manager"
export MAXIMIZE="true"
export MAXIMIZE_NAME="Chromium"
MAXIMIZE_SCRIPT=$STARTUPDIR/maximize_window.sh
/usr/bin/desktop_ready
if [ -z "$AUTH_SECRET" ]; then
export AUTH_SECRET=$(openssl rand -base64 32)
fi
BROWSER=$(which chromium-browser || which chromium || which google-chrome || echo "")
set +e
while true; do
if ! pgrep -f "$START_COMMAND" > /dev/null; then
cd "$WORK_DIR"
$START_COMMAND > /tmp/opencode-manager.log 2>&1 &
sleep 3
if [ -n "$BROWSER" ]; then
if ! pgrep -f "$BROWSER" > /dev/null; then
bash ${MAXIMIZE_SCRIPT} 2>/dev/null &
$BROWSER \
--no-first-run \
--no-default-browser-check \
--disable-gpu \
--start-maximized \
--window-position=0,0 \
"http://localhost:5003" &
fi
fi
fi
sleep 1
done