<!-- SOLID CITY · part 16 -->
   '/city/lost-wings-place.js',
    '/city/village-mauna.js', '/city/village-mauna-place.js',
    '/city/ancestor-roads.js', '/city/ancestor-roads-place.js',
    '/city/tunnel-bore.js', '/city/tunnel-bore-place.js', 
    '/city/baseline-meter.js',
    '/city/survey-camera.js',
    '/city/triangle-seam-auditor.js',
    '/city/auditor-place.js', '/city/network-graph.js', '/city/south-gate.js', '/city/south-gate-place.js',
    '/city/fleet-core.js', '/city/fleet.js', '/city/fleet-place.js',
    '/city/solid-figure.js',
    '/city/solid-figure-place.js',
    '/city/solid-mirror.js',
    '/city/solid-mirror-place.js',
  ];
  if ((req.method === 'GET' || req.method === 'HEAD') && (req.path === '/city' || req.path.indexOf('/city/') === 0)) {
    if (UNDER_CONSTRUCTION.indexOf(req.path) !== -1 || req.path.indexOf('/city/lost-wings/') === 0) {
      res.set('Cache-Control', 'no-store, no-cache, must-revalidate');
      res.set('Pragma', 'no-cache');
      res.set('Expires', '0');
    } else {
      res.set('Cache-Control', 'public, max-age=86400');
    }
  }
  if ((req.method === 'GET' || req.method === 'HEAD') && /^\/SolidBigIsland\/(mp3\/[A-Za-z0-9_.-]+\.mp3|thumbs\/[A-Za-z0-9_.-]+\.webp)$/.test(req.path)) {
    res.set('Cache-Control', 'public, max-age=604800');
  }
  next();
};


===== FILE: public/city/ai-light.js =====
/* ————————————————————————————————————————————————————————————————
 * EPISTLE OF THE LIGHT VISITOR — the AI Browser Mode's companion.
 *
 * The mode itself lives in the city's frame (half pixels, a
 * resting render). This companion carries the King's two field
 * teachings for a visiting builder:
 *
 *   SPAWN AT THE WORK — ?go=x,z sets the visitor down at the place
 *   being inspected the moment the city stands and the visit
 *   begins, instead of walking there from the plaza. (His words:
 *   "use setspawn for you to load and not walk where your building
 *   to see what your building.")
 *
 *   THE MIRROR — a plain-text line, refreshed once a second: where
 *   the visitor stands, how high, in what mode, and what the Perf
 *   Meter reads. A weak browser reads text long after it can no
 *   longer capture frames; the mirror is how the visit reports
 *   home when pictures are too heavy to carry.
 *
 * It acts only under ?ai=1. For every player it is not there.
 *
 * By the hand of Solid, his good King.
 * ———————————————————————————————————————————————————————————————— */
(function () {
  'use strict';
  /* the companion serves the ?ai=1 visitor only. Players who enter
   * by the Lite Entrance share the mode's fittings (set in city.js)
   * but not this mirror or the spawn — those are the inspector's
   * instruments, not the player's furniture. */
  if (!/[?&]ai=/.test(location.search)) return;
  if (!window.SC || !SC.api) return;
  var A = SC.api;

  var QS = new URLSearchParams(location.search);
  var go = null;
  if (QS.get('go')) {
    var parts = QS.get('go').split(',');
    var gx = parseFloat(parts[0]), gz = parseFloat(parts[1]);
    if (isFinite(gx) && isFinite(gz)) go = { x: gx, z: gz };
  }

  var mirror = null;
  function makeMirror() {
    if (mirror || !document.body) return;
    mirror = document.createElement('div');
    mirror.id = 'city-ai-mirror';
    mirror.style.cssText = 'position:fixed;left:8px;bottom:8px;z-index:9990;background:rgba(20,24,34,.92);border:1px solid rgba(154,164,181,.5);border-radius:8px;color:#cfd8e6;font:11px/1.5 ui-monospace,Menlo,monospace;padding:4px 8px;max-width:92vw;white-space:pre-line;pointer-events:none;';
    document.body.appendChild(mirror);
  }
  function drawMirror() {
    if (!mirror) return;
    var S = A.S;
    if (!S || !S.p) { mirror.textContent = 'AI MIRROR · entering…'; return; }
    var line = 'AI MIRROR · ' + (A.whereName ? A.whereName(S.p.x, S.p.z) : '—') +
      ' · x ' + Math.round(S.p.x) + ' z ' + Math.round(S.p.z) + ' · alt ' + Math.round(S.p.y) + ' m · mode ' + S.mode;
    if (window.CityPerf) {
      var s = CityPerf.snapshot();
      line += '\nframe p50 ' + s.frameP50Ms + 'ms · p95 ' + s.frameP95Ms + 'ms · ' + s.fpsAvg + ' fps · ' + s.drawCalls + ' calls · ' + Math.round(s.triangles / 1000) + 'k tris';
      for (var k in s.systems) { var y = s.systems[k]; line += ' · sys ' + k + ' ' + y.msPerSec + 'ms/s'; }
    }
    mirror.textContent = line;
  }

  var teleported = false, waited = 0;
  var iv = setInterval(function () {
    waited++;
    if (A.isBuilt && A.isBuilt()) {
      makeMirror(); drawMirror();
      if (go && !teleported && A.S && A.S.p && A.S.mode) {
        teleported = true;
        A.S.p.x = go.x; A.S.p.z = go.z;
        if (A.groundAt) A.S.p.y = A.groundAt(go.x, go.z);
        if (A.help) A.help('AI visitor spawned at the work: ' + go.x + ', ' + go.z, 6);
        drawMirror();
      }
    }
    if (waited > 480) clearInterval(iv);   // the mirror rides for two minutes of checks, then keeps its 1s draw below
  }, 250);
  setInterval(function () { if (mirror) drawMirror