@rubytech/create-maxy 1.0.786 → 1.0.787

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubytech/create-maxy",
3
- "version": "1.0.786",
3
+ "version": "1.0.787",
4
4
  "description": "Install Maxy — AI for Productive People",
5
5
  "bin": {
6
6
  "create-maxy": "./dist/index.js"
@@ -655,8 +655,22 @@ function handleRequest(req, res) {
655
655
  // Use async open+write to avoid blocking the event loop (a FIFO
656
656
  // write blocks until a reader opens the other end).
657
657
  connecting = true;
658
- res.writeHead(202, { "Content-Type": "application/json" });
659
- res.end('{"status":"connecting"}');
658
+ // Return success immediately with the post-connect URL info.
659
+ // Why not poll for verification? The AP and station modes are
660
+ // mutually exclusive on a single radio: as soon as the bash
661
+ // script tears down hostapd to run `nmcli connect`, the phone
662
+ // loses its connection to 192.168.4.1 and any subsequent
663
+ // `/result` poll dies. The success page must be in the phone's
664
+ // hands BEFORE the AP goes away. We send the hostname (.local
665
+ // resolution works on iOS/macOS) and the operator can paste
666
+ // the URL into a browser if .local fails on their device.
667
+ res.writeHead(200, { "Content-Type": "application/json" });
668
+ res.end(JSON.stringify({
669
+ success: true,
670
+ hostname: HOSTNAME,
671
+ // ip is intentionally absent: we don't yet know the new
672
+ // home-WiFi IP and the AP IP (192.168.4.1) is about to die.
673
+ }));
660
674
 
661
675
  const fifoData = `${ssid}\n${password}`;
662
676
  fs.open(CONNECT_FIFO, "w", (err, fd) => {