open-terminal 0.11.34 bare-metal (human-authorized host install) with a systemd template unit: reachableceo on tailscale-only :30000 (cwd ~/projects) and all 8 other accounts on :30001-30008, each with its own key kept out of ps in per-user TOMLs, all users added to the docker group. Keys live in ~/.creds + /etc/ukrrs/open-terminal, never in this repo. UAT: throwaway OpenWebUI v0.11.1 (matched to the human's Cloudron prod) driven purely over its HTTP API against the beta gateway lane - connection verify/config PASS, direct exec as uid 1001 PASS, and the chat round trip PASS: the model emitted run_command, we executed it through OpenWebUI's terminal proxy (server holds the key), and the final answer named 9/9 real project directories; earlier negative runs prove the test catches hallucinated output. Ops note OPEN-TERMINAL.md documents production wiring (prod openwebui container v0.3.10 is too old and needs an upgrade first). Also tonight: agent-stack relaunchers removed (6-, backups kept) so no screen/crush sessions auto-start on reboot; 22:00 night-profile flip observed live; docs synced for the earlier teardown. 💘 Generated with Crush Assisted-by: Crush:glm-5.2 [#610]
42 lines
1.4 KiB
Bash
Executable File
42 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Boot-time restore for the reachableceo PMO/Work stack (systemd unit:
|
|
# reachableceo-agent-stack.service). Self-sufficient at boot: re-preps
|
|
# /run/screen + screen setuid (tmpfs resets each boot), then respawns any
|
|
# dead screens via the spawner and injects intro prompts into fresh
|
|
# spawns only. Idempotent.
|
|
set -uo pipefail
|
|
|
|
SETUP=/usr/local/sbin/setup-rceo-stack.sh
|
|
USR=reachableceo
|
|
PREFIX=RCEO
|
|
FOUNDER_ACCT=reachableceo
|
|
SRC_CRUSH=/home/TSGCOO/.local/share/crush
|
|
|
|
mkdir -p /run/screen
|
|
chmod 755 /run/screen
|
|
[[ -u /usr/bin/screen ]] || chmod u+s /usr/bin/screen
|
|
|
|
out="$(bash "$SETUP" "$USR" "$FOUNDER_ACCT" "$SRC_CRUSH" "$PREFIX" 2>&1)" || true
|
|
echo "$out"
|
|
|
|
declare -A SPAWNED
|
|
for s in "${PREFIX}-PMO" "${PREFIX}-Work"; do
|
|
[[ "$out" == *"spawned: $s"* ]] && SPAWNED["$s"]=1
|
|
done
|
|
|
|
if [[ ${#SPAWNED[@]} -eq 0 ]]; then
|
|
echo "no sessions needed respawn"
|
|
exit 0
|
|
fi
|
|
|
|
echo "settling 20s before intro injection..."
|
|
sleep 20
|
|
for s in "${!SPAWNED[@]}"; do
|
|
if [[ "$s" == *-PMO ]]; then intro=INTRO-PMO.md; else intro=INTRO-WORK.md; fi
|
|
msg="Please read ~/.coordinate/prompts/${intro} and treat it as your introduction from the founder, then follow it."$'\r'
|
|
runuser -u "$USR" -- env HOME="/home/$USR" TERM=xterm-256color \
|
|
screen -S "$s" -X stuff "$msg" \
|
|
&& echo "injected: $USR/$s ($intro)" \
|
|
|| echo "INJECT FAILED: $USR/$s"
|
|
done
|