#pragma once // LAN dev server — HTTP control endpoint + mDNS/Bonjour responder. // Runs on its own thread (like wifi). The device answers at // http://.local/ (slot from /mnt/.ac-device-slot, else "notepat") // and advertises _http._tcp via DNS-SD so it shows up in Bonjour // browsers like a printer. // // HTTP routes (port 80): // GET / → status JSON (name, build, piece, ip, uptime) // GET /logs → tail of the runtime log // GET /pieces/.mjs → read a piece back // PUT /pieces/.mjs[?jump=1] → write piece (atomic), optionally reload // PUT /lib/.mjs → write a lib module // POST /jump/ → hot-reload piece (writes /tmp/ac-jump) void lanserv_start(const char *build_name); // Supply the hardware fingerprint once computed (drives the unique mDNS // name when no curated slot is assigned). Safe to call after lanserv_start. void lanserv_set_fingerprint(const char *fp); // Per-frame from the main loop: current piece + wifi ip ("" when down). void lanserv_update(const char *piece, const char *ip); void lanserv_stop(void);