Add Phase 1 matrix-nio bot (listener + launch + fail-loud)

- src/bot.py: log in as the bot user with the stored token, prime past history,
  and on a new message in a mapped room run `ssh -> gui-launch.sh` (built with
  shlex.quote). The all-projects room fans out to every repo, each session named
  "<repo> - <date>". Launch failures are reported back into the room.
- scripts/gui-launch.sh: propagate MB_SESSION_NAME into the launched session.
- requirements.txt: matrix-nio.

Connectivity (sub-step 1) verified on the Mac; launch (sub-step 2/3) to be tested
on the Spark, where the SSH alias resolves.
This commit is contained in:
Keysat
2026-06-15 14:34:15 -05:00
parent b6cc829f53
commit 76d8a001b1
3 changed files with 135 additions and 0 deletions
+2
View File
@@ -36,6 +36,8 @@ fi
launch_script="$(mktemp -t mb-launch)"
{
print -r -- '#!/bin/zsh -l'
# Propagate a caller-supplied session name (the bot sets this for all-projects launches).
[[ -n "$MB_SESSION_NAME" ]] && printf 'export MB_SESSION_NAME=%q\n' "$MB_SESSION_NAME"
printf 'exec %q %q %q\n' "$inner" "$repo_dir" "$prompt"
} >| "$launch_script"
chmod +x "$launch_script"