Files
apress/deploy/uno-q/com.redclaw.apess-board-recover.plist
T
Omar SobhandClaude Opus 4.8 e76e27f06d chore(uno-q): auto-recover the board on USB re-plug
Replace the obsolete host-daemon recover.sh with the current App-Lab-node flow:
re-forward the adb tunnels (:8080 gateway, :9999 matrix relay), wait for the
daemon (start the app if needed), re-register the node with the local API, and
sync a fixed claim code onto the matrix so the board + API agree. Adds a
`--watch` mode and a launchd agent (com.redclaw.apess-board-recover.plist) that
runs it on every reconnect — so a re-plug heals itself, no manual step.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-23 07:38:21 -07:00

52 lines
1.7 KiB
Plaintext

<?xml version="1.0" encoding="UTF-8"?>
<!--
launchd agent: auto-run the board recovery watcher.
It keeps `recover.sh --watch` alive, which sits on `adb wait-for-device` and
re-forwards tunnels + re-registers the node with the local API every time the
Uno Q reconnects — so a USB re-plug heals itself with no manual step.
Install (per-user):
cp deploy/uno-q/com.redclaw.apess-board-recover.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.redclaw.apess-board-recover.plist
Stop / uninstall:
launchctl unload ~/Library/LaunchAgents/com.redclaw.apess-board-recover.plist
Logs: ~/Library/Logs/apess-board-recover.log
Edit the paths below if your checkout lives elsewhere.
-->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.redclaw.apess-board-recover</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/quantum/projects/apress/deploy/uno-q/recover.sh</string>
<string>--watch</string>
</array>
<key>EnvironmentVariables</key>
<dict>
<!-- launchd's PATH is minimal; add Homebrew + platform-tools for adb/python3/curl. -->
<key>PATH</key>
<string>/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
<!-- Override any of recover.sh's knobs here if needed, e.g.: -->
<!-- <key>CLAIM_CODE</key><string>7777</string> -->
</dict>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>10</integer>
<key>StandardOutPath</key>
<string>/Users/quantum/Library/Logs/apess-board-recover.log</string>
<key>StandardErrorPath</key>
<string>/Users/quantum/Library/Logs/apess-board-recover.log</string>
</dict>
</plist>