From ab0d321182330174e6c7a79f8ae9380bc49a202d Mon Sep 17 00:00:00 2001
From: Matthias Nott <mnott@mnsoft.org>
Date: Tue, 04 Aug 2026 17:39:01 +0200
Subject: [PATCH] release: 1.1.0, and fix the two defects that made OTA install impossible

---
 tools/deploy.sh |   13 ++++++++++---
 pubspec.yaml    |    2 +-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/pubspec.yaml b/pubspec.yaml
index 91ced3e..4008653 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,7 +1,7 @@
 name: pailot
 description: "Voice-first AI communicator"
 publish_to: 'none'
-version: 1.0.0+1
+version: 1.1.0+2
 
 environment:
   sdk: ^3.11.1
diff --git a/tools/deploy.sh b/tools/deploy.sh
index c64824d..d4693ba 100755
--- a/tools/deploy.sh
+++ b/tools/deploy.sh
@@ -89,7 +89,9 @@
   VERSION="$(grep -E '^version:' pubspec.yaml | sed -E 's/version:[[:space:]]*//; s/\+.*//' | head -1)"
   echo ""
   echo "=== Publishing to aibroker-ota hub (Tailscale) ==="
-  resp="$(curl -sf -X POST http://127.0.0.1:8765/api/apps \
+  # 8767, not 8765. The AIBroker daemon's PAILot MQTT broker owns 8765, so this
+  # POST went to an MQTT listener and curl came back with nothing.
+  resp="$(curl -sf -X POST http://127.0.0.1:8767/api/apps \
     -F slug=pailot -F name=PAILot -F bundleId=com.tekmidian.pailot \
     -F "version=${VERSION:-1.0.0}" -F platform=ios -F "file=@${IPA}" 2>&1)" || {
       echo "ERROR: publish failed — is the hub up? Run: aibroker ota up" >&2; exit 1; }
@@ -97,12 +99,17 @@
   ts="tailscale"; command -v tailscale >/dev/null 2>&1 || ts="/Applications/Tailscale.app/Contents/MacOS/Tailscale"
   host="$("$ts" status --json 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{console.log(JSON.parse(s).Self.DNSName.replace(/\.$/,""))}catch{}})' 2>/dev/null || true)"
   echo ""
+  # The :8443 is not optional. `aibroker ota up` maps /install/ and /api/ under
+  # the TAILNET-ONLY listener on 8443; port 443 on the same host is a Funnel
+  # carrying the Todoist webhook and nothing else. Printing the URL without the
+  # port sent you to that Funnel, which 404s — and it did so on the road, which
+  # is the only place this command is ever used.
   if [[ -n "$host" ]]; then
     echo "  Install on any tailnet device — open in Safari:"
-    echo "    https://${host}/install/pailot/"
+    echo "    https://${host}:8443/install/pailot/"
   else
     echo "  Published. Open the install page in Safari on a tailnet device:"
-    echo "    https://<your-mac-tailnet-host>/install/pailot/"
+    echo "    https://<your-mac-tailnet-host>:8443/install/pailot/"
   fi
   echo ""
   echo "=== Done (OTA). Tap Install in Safari, then force-quit & reopen PAILot. ==="

--
Gitblit v1.3.1