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]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
1a39457940
commit
e76e27f06d
@@ -0,0 +1,51 @@
|
||||
<?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>
|
||||
Reference in New Issue
Block a user