Land Phase 0 launch chain: SSH -> desktop Terminal -> claude -> phone

Phase 0 proven by hand (N=3) across multiple rooms.

- scripts/gui-launch.sh: open a desktop Terminal via osascript so claude runs in
  the GUI session (login Keychain + real TTY), avoiding a long-lived token (D11).
- scripts/launch-claude.sh: name the session `claude -n "<repo> - <topic>"` so
  Remote Control's phone conversation index is readable.
- .env.example: bot credential schema (real .env stays gitignored).
- AGENTS.md / ROADMAP.md: D11, Phase 0 results, Phase 1 carry-overs.
This commit is contained in:
Keysat
2026-06-15 13:58:15 -05:00
parent 326c3d5398
commit b6cc829f53
5 changed files with 136 additions and 7 deletions
+9
View File
@@ -14,6 +14,15 @@ after it.
- matrix-nio bot in a container on the Spark, logged in as a bot Matrix user.
- One hardcoded room → one repo. Any message in it spawns a session via the Mac wrapper.
- Carry over from Phase 0's proven launch chain (`ssh mac-bridge → gui-launch.sh → launch-claude.sh`):
- **Bake the SSH key + `mac-bridge` config into the container** (modelo's `~/.ssh` won't exist there).
- **Named sessions for the phone app.** Pass `claude -n "<repo> — <topic>"` so the Remote Control
conversation index is readable (project + topic). Bot derives `<topic>` from the message; confirm
whether the app labels off `-n` or `--remote-control <name>`. Plumb a name arg through the wrappers.
- **Quote-safe message passing.** Bot builds the SSH command with `shlex.quote`; `gui-launch.sh`
already isolates the osascript/shell layers via a `%q` temp script — stress-test with hostile text.
- **Fail loud, not silent.** Detect a stalled launch (untrusted-repo trust gate, or a reset Terminal
Automation grant) and report it back into the room instead of hanging.
- **Exit (falsifiable):** 3 consecutive real messages each correctly launch a drivable
session on the phone.