forked from bots-garden/ori
| 🛟 Updated. | 1 | # 2026-09-18 — AppleScript launcher (`scripts/launch-ori.applescript`) |
| 2 | ||
| 3 | ## State | |
| 4 | ||
| 5 | Written, compile-checked, handlers tested in isolation. **Not yet run end to end** — that needs Docker Desktop + a real `sbx run`, which creates the sandbox and starts Claude inside it. First real run to do by the user: `osascript scripts/launch-ori.applescript`. | |
| 6 | ||
| 7 | ## Things to confirm on the first real run | |
| 8 | ||
| 9 | - Behaviour of `sbx run -d --name ori` when the sandbox is already **running** (unknown: no-op or error?). The script only notifies on error there and relies on the health check, so either way the app should open; tighten if the notification is noisy. | |
| 10 | - Time for the kit to start the server after `sbx run -d` returns; budget is 90 s (`healthTimeoutSeconds`), adjust if the template pull makes the first launch slower. | |
| 11 | - `display notification` from a compiled app may need notification permission the first time. | |
| 12 | ||
| 13 | ## Traps | |
| 14 | ||
| 15 | - `do shell script` PATH: fine from a terminal (inherits the shell), minimal from Finder — hence the explicit `export PATH`. | |
| 16 | - `sbx inspect`/`sbx ports` on a missing sandbox print `ERROR:` but their exit code was masked in my probe; `sbx ls -q` (names only) is the reliable existence test. | |
| 17 | - Handlers can be tested without running `on run`: `osacompile -o /tmp/x.scpt …` then `load script` + call `s's waitForServer(...)`. | |
| 18 | ||
| 19 | ## Update (same day) — double-clickable app | |
| 20 | ||
| 21 | `scripts/Launch Ori.app` built with `osacompile -o "scripts/Launch Ori.app" scripts/launch-ori.applescript`; gitignored (`scripts/*.app/`), rebuild after editing the `.applescript`. `path to me` then resolves to the `.app` bundle inside `scripts/`, so the repo root still derives correctly. The app has no quarantine attribute (built locally), so Gatekeeper does not block it. Still not run end to end. | |
| 22 | ||
| 23 | ## Update — README | |
| 24 | ||
| 25 | `scripts/README.md` (EN) and `scripts/README.fr.md` (FR) document the launcher; keep them in sync with the `property` defaults at the top of the script if those change. |