Skip to content

A spy satellite simulator in your browser, except the data is real. Live open source spatial intelligence on a photorealistic 3D globe.

Merge upstream/main (v0.2.1) into pr/mapillary-layer

Said Turksever5a7ce5785e3d
diff --cc .env.example
index 91c1fafa2,68fb3481a..bbbb4b421
--- a/.env.example
+++ b/.env.example
@@@ -65,25 -68,20 +68,29 @@@ OPENAI_REALTIME_REASONING_EFFORT=lo
OPENAI_REALTIME_CONTEXT_TOKENS=3000
OPENAI_REALTIME_CONTEXT_RETENTION=0.5
OPENAI_HUD_SUMMARY_MODEL=gpt-5-nano
- # Optional: opt-in per-IP rate limit for the OpenAI cost endpoints
+ # Per-IP rate limit for the OpenAI cost endpoints
# (/api/realtime/token + /api/openai/hud-summary), in requests per minute.
- # DEFAULT IS UNLIMITED — unset (or 0) means no throttling, unchanged behavior.
- # Set a positive integer to cap per-IP spend when self-hosting on a network.
- # Recommended whenever HOST is not localhost. NOTE: this is a per-IP,
- # process-local guard (in-memory, resets on restart; over-limit requests get a
- # sanitized 429) — it is NOT a billing cap. For hard spend protection set a
- # provider-side budget: OpenAI platform -> Settings -> Limits (usage limits).
- # GEV_RATELIMIT_OPENAI_PER_MIN=30
+ # DEFAULTS TO 30, the value the Pinokio build also ships. That clears ordinary
+ # use several times over: an open tab asks for a HUD summary every 15s (4/min)
+ # and a voice session mints one token. Raise or lower it with a positive
+ # integer; set it to exactly 0 to run unthrottled. An unreadable value (a typo,
+ # a stray unit) falls back to the default rather than to unlimited, so a slip
+ # cannot quietly disarm the guard. A positive value below 1 counts as 1.
+ # NOTE: this is a per-IP, process-local guard (in-memory, resets on restart;
+ # over-limit requests get a sanitized 429) — it is NOT a billing cap. For hard
+ # spend protection set a provider-side budget: OpenAI platform -> Settings ->
+ # Limits (usage limits).
+ # GEV_RATELIMIT_OPENAI_PER_MIN=30 # the default; uncomment only to change it
+# Optional: Mapillary street-level imagery — coverage lines on the globe and
+# the embedded MapillaryJS viewer in the Street Level layer.
+# Free client token: https://www.mapillary.com/dashboard/developers (register an
+# application, copy the "Client Token"). CLIENT-EXPOSED by design: MapillaryJS
+# fetches imagery straight from Mapillary in the browser, so this token is in
+# the bundle like GOOGLE_MAPS_API_KEY. Mapillary client tokens are meant to be
+# public; the dev server also uses it to fetch and cache coverage tiles.
+MAPILLARY_CLIENT_TOKEN=
+
# Optional: OpenSky auth mode (oauth | basic | auto | anon)
# Default: oauth — requires client credentials below
# Set to "anon" to skip aircraft auth (rate-limited but works)
diff --cc CHANGELOG.md
index 837ddd00f,39cf9b524..4983e1b6c
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@@ -1,16 -1,107 +1,119 @@@
# Changelog
+ ## [Unreleased]
+
+- Rail panels can opt into a portable mode: dragging the CCTV or Street Level
+ panel by its header lifts it out of the right rail into a floating window
+ that resizes from any edge or corner, remembers its position and size across
+ reloads, and snaps back on a header double-click. A panel can also ask to
+ dock when it is collapsed while floating (Street Level does).
+
+- Street Level: a provider-neutral street-level imagery layer modelled on the iD editor's photo overlay. One panel in the right rail carries a chip per imagery provider, shared 360°/flat and captured-since filters, coverage drawn on the globe from orbit down to a single street, image cones per sequence, and one embedded viewer whose adapter follows the provider of the open image; each active provider credits its imagery on the globe, and share links carry the provider switches and the filter. Mapillary is the first provider (free client token; CC BY-SA 4.0 imagery); Google Street View, KartaView and Panoramax are next. The panel is kept simple: the viewer opens at the top so the photo needs no scrolling, the header pill and the provider chips switch the layer, and SINCE is a slider. FOLLOW (the globe camera following the street-level view) is available on the Google 3D map only.
+
+- Street Level draws each imagery source in one colour, everywhere it appears: its PROVIDERS chip, coverage lines, overview points, image cones and a single legend swatch. Mapillary is green (no more age dimming or magenta panoramas; 360° cones are rings, and the 360°/FLAT filter still separates them); Panoramax will be purple and Google Street View blue.
+
+- Street Level coverage no longer floats over trees and bridges on the Google 3D map. At street zoom, sequence lines, image cones and the position marker are placed on the bare earth from the terrain service (with a 2 m lift) instead of being draped on the top of the photoreal mesh, so buildings and tree canopies hide what is behind them; other maps and higher views keep draped lines. Opening a photo no longer flies the camera underground when the Google tiles under it have not loaded yet. Near the camera the placement is refined against the rendered Google 3D surface, so lines also follow freeways in trenches and steep streets, and stay on the road under trees.
++
+ ## [0.2.1] — 2026-10-02 — God's Eye View through Your Agent (with security fixes and other features)
+
+ - Ship each bundled data pack once. The region, marine, admin-boundary,
+ county, military-name and neighborhood packs were emitted twice by the
+ production build, as the JSON the browser fetches and as an unused
+ JavaScript copy; `dist/` drops from 54 MB to 42 MB. Under Node the loader
+ reads the JSON file directly (reporting that Node 24.14 or newer is needed
+ on a runtime too old to do so), and a test keeps app code from importing a
+ pack as a module.
+
+ - Apply the Host check before the app's own routes. Vite installs its Host
+ check after the middleware that plugins add, so the provider and `/api`
+ routes used to answer any Host, including a DNS-rebinding name, in every
+ mode. A first-running middleware now applies the same allowed hosts on the
+ dev and preview servers.
+
+ - Refuse cross-site browser requests to the cost-bearing and log endpoints
+ (`/api/realtime/token`, `/api/openai/hud-summary`,
+ `/api/google/nearby-places`, `/api/google/text-search`,
+ `/api/realtime/debug-log`): a foreign or opaque
+ Origin, a cross-site `Sec-Fetch-Site`, or proxy forwarding headers get 403,
+ while loopback tools and LAN use keep working. The dev and preview servers
+ send one shared Content-Security-Policy (James Sumpter, #242).
+
+ - The voice debug log records the server's own time: a record can no longer
+ supply its `loggedAt`. The dev and preview servers also send
+ `X-Content-Type-Options: nosniff` (findings by Sunil, #710).
+
+ - Keep the Host-header check when binding to all interfaces. `HOST=0.0.0.0`
+ used to accept any Host; the dev and preview servers now accept IP
+ addresses, `localhost` and the LAN hostnames listed in `GEV_ALLOWED_HOSTS`
+ (suffix and wildcard entries are ignored), which also keeps DNS-rebinding
+ names out in LAN mode. The `.local` suffix is no longer accepted by default;
+ list such a name explicitly (Puspo Aditya, #97, fixes #21).
+
+ - Throttle the cost-bearing proxies by default instead of on request. The
+ OpenAI endpoints (`/api/realtime/token`, `/api/openai/hud-summary`) now allow
+ 30 requests per minute per client IP and the Google Places endpoints
+ (`/api/google/nearby-places`, `/api/google/text-search`) 120 — the caps the
+ Pinokio build already ships, so the packaged app is unaffected and only an
+ unconfigured server changes, from unlimited to what the product already runs
+ with. `GEV_RATELIMIT_OPENAI_PER_MIN` and `GEV_RATELIMIT_GOOGLE_PER_MIN` still
+ override the caps, and exactly `0` disables them; a value that cannot be read
+ as a number now falls back to the default rather than to unlimited, so a typo
+ cannot silently disarm the guard (daikaginza, #683).
+
+ - Tighten the local MCP server and embed mode. The panel's `panel_request`
+ needs the key in its MCP server's panel page, and refuses Provider
+ Settings, credential and model endpoints, `/mcp` and development server
+ routes in any letter case, encoding or dot suffix; panels on one server share six
+ requests in flight, and further requests wait their turn. `/mcp` applies Provider Settings' proxy and sharing checks,
+ requires a Host on the port it reached and an Origin from that host, and
+ times out request bodies after 30 seconds; stdio honors
+ `notifications/cancelled`. Embed mode is no longer framable unless
+ `GEV_EMBED_FRAME_ANCESTORS` allows the framing page, and view answers go
+ only to the origin that sent the view. SECURITY.md describes the MCP surface
+ and the panel's browser keys.
+
+ - Cockpit now enters on the existing matching map style while keeping one fixed,
+ duplicate-free carousel over `Normal / CRT / NVG / FLIR / Anime / Noir / Snow`.
+ Normal remains a real unfiltered option; Cockpit-only choices still restore
+ the captured map style through both Exit Cockpit and Reset.
+ - Cyber's compact right-rail and Cockpit utility buttons now center their glyphs
+ vertically and share the same inset and edge alignment.
+ - Keep Cyber Voice help/error popups and Location/Visual Presets pins clear of
+ their decorative frames. Leave space above attribution for its full logo row.
+ - Add an intentionally future-facing, opt-in panel surface contract for new
+ panels to inherit compatible Normal, Cyber and Cockpit styling. Its first
+ production adopter will land separately after this change.
+ - Restore the user's previous visual preset when they explicitly switch from
+ Cyber to another HUD layout, without overriding scene or shared-link state.
+ - Move the aligned Cyber side-panel rails upward on desktop so the left stack
+ clears the lower coordinate card; keep Cockpit's independent visor layout.
+
+ ## [0.2.0] — 2026-10-02 — God's Eye View through Your Agent
+
+ - Show God's Eye View inside AI conversations. Answers that can be shown
+ include a view (camera, layers, style, map, marks, something to follow),
+ and `show_in_gods_eye_view` displays it as the live globe in clients that
+ support MCP Apps, such as Claude Desktop and the Codex and ChatGPT desktop
+ apps, and as a link everywhere else. The panel loads the app's panel build
+ (`npm run build:panel`) and its data through the MCP server, so a local
+ server needs no HTTPS or tunnel. `?embed=1` shows the globe alone for pages
+ that frame the app.
+
+ - Add tools for language-model clients and a local MCP server, served over
+ stdio by `npm run mcp` and over HTTP at `/mcp` on the development and preview
+ servers for local requests only. `npm run mcp`
+ serves earthquake, active-fire, launch, aircraft, ship, satellite, camera, radio,
+ place, routing, bike-share, transit, traffic, weather, cyclone, fire-perimeter,
+ terrain, installation and map-feature queries, plus a situation brief, over
+ stdio to clients such as Claude Code, reading
+ from a running app. Tools are defined
+ once in `gods-eye-view/tools`, reuse the layers' source factories, and are
+ exposed through the protocol adapter in `gods-eye-view/tools/mcp`. The
+ catalog also covers weather maps, wind, recent imagery, submarine cables,
+ license plate reader cameras, datacenters and dams, the Bhote Koshi flood,
+ military awareness and links that open the app over an area with layers on.
+ Voice offers the same queries next to its app actions.
+
- Public Overpass instances are no longer used by default. Street Traffic
roads come from TomTom flow tiles, OpenFreeMap vector tiles, or both, chosen
on the layer row (TomTom / OSM / Hybrid) or with `?trafficRoads=`. With a
diff --cc README.md
index c3225fb21,85e66938d..fff4add97
--- a/README.md
+++ b/README.md
@@@ -279,32 -279,33 +279,34 @@@ _Ask for radio near anywhere and the gl
---
+ **💬 Or ask from Claude and Codex.** God's Eye View is also an MCP server: ask Claude Desktop, Codex or ChatGPT desktop to show a place, and the live globe opens right in the conversation. Setup takes a minute — see [docs/MCP_SETUP.md](docs/MCP_SETUP.md).
+
## 🛰️ What's on the Globe
-Nineteen layers and map sources. **Seventeen have a keyless path.** Some offer additional capabilities with a provider key. (🟢 no key · 🟡 free key · 🔴 metered.)
-
-| Layer | What you get | Source | Auth |
-| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------- |
-| 🗺️ **Map Stack** | Esri satellite imagery, Google Photorealistic 3D, OSM, plus additional ion-hosted stacks | Esri / Google / Ion / OSM | 🟢 Esri satellite + OSM · 🟡 ion-hosted Google 3D + world terrain · 🔴 direct Google + place search |
-| ✈️ **Live Flights** | 11,000+ live aircraft + route history | OpenSky + adsb.lol | 🟢 (🟡 optional for more polling credits) |
-| 🎖️ **Military Flights** | ADS-B military traffic in amber | adsb.lol | 🟢 |
-| 🚢 **Live Vessels** | Thousands of ships worldwide | AISStream | 🟡 |
-| 🛰️ **Satellites** | 838-object catalog, color-coded by class with a live legend — the **DENSE** chip drops in the whole Starlink shell | CelesTrak | 🟢 |
-| 🌍 **Earthquakes** | Global seismic activity, last 24h | USGS | 🟢 |
-| 🚗 **Traffic** | Simulated vehicles on OSM roads. With TomTom, live flow speeds drive the simulation and congestion colors below ~8 km; individual vehicle positions are not live observations | TomTom + OSM | 🟢 simulation · 🟡 live flow speeds |
-| 📹 **CCTV Mesh** | ~3,600 public cameras projected _into_ the 3D space — Austin · Texas (TxDOT) · California (Caltrans) · London (TfL) · Ontario (511) · Finland (Fintraffic) · British Columbia (DriveBC) · Estonia (Tallinn, Tarktee) · Delaware (DelDOT live video) · New South Wales (Live Traffic NSW) · Calgary. Positions are published; poses are estimated priors **you calibrate by dragging a gizmo on the camera itself** | City APIs | 🟢 |
-| 📷 **Mapped ALPR Cameras** | License-plate-reader camera locations tagged by OpenStreetMap contributors, loaded one city-sized view at a time, with **SHOW NEAREST**. Locations and tags only: no plate data, no video | OpenStreetMap (incl. DeFlock mapping) | 🟢 |
-| 📻 **Radio** | Geolocated world radio with an **analog tuner** — drag the needle across up to 750 stations and the globe flies to each broadcaster | Radio Browser / broadcasters | 🟢 |
-| 🚌 **Transit** | Live buses, trams, metros, trains and ferries with delayed playback between reports, selected-vehicle trails, and mode-coloured DETECT labels — Boston, Austin, Minneapolis, Helsinki, the Netherlands, Norway, South East Queensland | Operator GTFS-Realtime feeds | 🟢 |
-| 🚲 **Bikeshare** | Live station availability | GBFS | 🟢 |
-| 🧭 **Directions** | Click A and B on the globe for a street-following drive, walk or cycle route draped on the terrain with turn-by-turn steps — then FLY the camera along it. No key, no geocoder, no mic | OSRM on FOSSGIS servers (OpenStreetMap) | 🟢 |
-| 🔥 **Active Fires** | Live NASA FIRMS detections, trailing 24h | NASA FIRMS | 🟡 |
-| 🚀 **Space Missions** | Rolling 30-day launches with payload, stage, and recovery detail | Launch Library 2 | 🟢 (🟡 optional token raises the allowance) |
-| 🎖️ **Mapped Installations** | Viewport-bounded military-site context from community mapping — incomplete by nature, and labeled that way | OpenStreetMap | 🟢 |
-| 🌬️ **Wind** | Animated 10 m forecast wind with an optional speed, temperature or pressure color field and a reading at map center | NOAA GFS / ECMWF IFS | 🟢 |
-| 🌦️ **Observed Weather** | Rain radar (contiguous US), Satellite clouds (GOES regional or global infrared, Clouds only or Full image) and Lightning density (Americas and Pacific) on one history timeline | NOAA nowCOAST | 🟢 |
-| 🌀 **Cyclones** | Advisory positions, forecast tracks and uncertainty cones for the Atlantic and eastern/central North Pacific | NOAA NHC / CPHC | 🟢 |
+Twenty layers and map sources. **Seventeen have a keyless path.** Some offer additional capabilities with a provider key. (🟢 no key · 🟡 free key · 🔴 metered.)
+
+| Layer | What you get | Source | Auth |
+| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------- | --------------------------------------------------------------------------------------------------- |
+| 🗺️ **Map Stack** | Esri satellite imagery, Google Photorealistic 3D, OSM, plus additional ion-hosted stacks | Esri / Google / Ion / OSM | 🟢 Esri satellite + OSM · 🟡 ion-hosted Google 3D + world terrain · 🔴 direct Google + place search |
+| ✈️ **Live Flights** | 11,000+ live aircraft + route history | OpenSky + adsb.lol | 🟢 (🟡 optional for more polling credits) |
+| 🎖️ **Military Flights** | ADS-B military traffic in amber | adsb.lol | 🟢 |
+| 🚢 **Live Vessels** | Thousands of ships worldwide | AISStream | 🟡 |
+| 🛰️ **Satellites** | 838-object catalog, color-coded by class with a live legend — the **DENSE** chip drops in the whole Starlink shell | CelesTrak | 🟢 |
+| 🌍 **Earthquakes** | Global seismic activity, last 24h | USGS | 🟢 |
+| 🚗 **Traffic** | Simulated vehicles on OSM roads. With TomTom, live flow speeds drive the simulation and congestion colors below ~8 km; individual vehicle positions are not live observations | TomTom + OSM | 🟢 simulation · 🟡 live flow speeds |
+| 📹 **CCTV Mesh** | ~3,600 public cameras projected _into_ the 3D space — Austin · Texas (TxDOT) · California (Caltrans) · London (TfL) · Ontario (511) · Finland (Fintraffic) · British Columbia (DriveBC) · Estonia (Tallinn, Tarktee) · Delaware (DelDOT live video) · New South Wales (Live Traffic NSW) · Calgary. Positions are published; poses are estimated priors **you calibrate by dragging a gizmo on the camera itself** | City APIs | 🟢 |
+| 📷 **Mapped ALPR Cameras** | License-plate-reader camera locations tagged by OpenStreetMap contributors, loaded one city-sized view at a time, with **SHOW NEAREST**. Locations and tags only: no plate data, no video | OpenStreetMap (incl. DeFlock mapping) | 🟢 |
+| 📷 **Street Level** | Street-level imagery from several providers behind one panel, modelled on the iD editor's photo overlay: a chip per provider, shared 360°/flat and captured-since filters, coverage drawn onto the streets from orbit down to a single road, image cones per sequence, and an embedded viewer with a **CAMERA FOLLOWS VIEW** mode. Mapillary ships in this build; Google Street View, KartaView and Panoramax are planned | Mapillary | 🟡 Mapillary client token |
+| 📻 **Radio** | Geolocated world radio with an **analog tuner** — drag the needle across up to 750 stations and the globe flies to each broadcaster | Radio Browser / broadcasters | 🟢 |
+| 🚌 **Transit** | Live buses, trams, metros, trains and ferries with delayed playback between reports, selected-vehicle trails, and mode-coloured DETECT labels — Boston, Austin, Minneapolis, Helsinki, the Netherlands, Norway, South East Queensland | Operator GTFS-Realtime feeds | 🟢 |
+| 🚲 **Bikeshare** | Live station availability | GBFS | 🟢 |
+| 🧭 **Directions** | Click A and B on the globe for a street-following drive, walk or cycle route draped on the terrain with turn-by-turn steps — then FLY the camera along it. No key, no geocoder, no mic | OSRM on FOSSGIS servers (OpenStreetMap) | 🟢 |
+| 🔥 **Active Fires** | Live NASA FIRMS detections, trailing 24h | NASA FIRMS | 🟡 |
+| 🚀 **Space Missions** | Rolling 30-day launches with payload, stage, and recovery detail | Launch Library 2 | 🟢 (🟡 optional token raises the allowance) |
+| 🎖️ **Mapped Installations** | Viewport-bounded military-site context from community mapping — incomplete by nature, and labeled that way | OpenStreetMap | 🟢 |
+| 🌬️ **Wind** | Animated 10 m forecast wind with an optional speed, temperature or pressure color field and a reading at map center | NOAA GFS / ECMWF IFS | 🟢 |
+| 🌦️ **Observed Weather** | Rain radar (contiguous US), Satellite clouds (GOES regional or global infrared, Clouds only or Full image) and Lightning density (Americas and Pacific) on one history timeline | NOAA nowCOAST | 🟢 |
+| 🌀 **Cyclones** | Advisory positions, forecast tracks and uncertainty cones for the Atlantic and eastern/central North Pacific | NOAA NHC / CPHC | 🟢 |
**Weather, keyless.** **Wind** animates 10 m forecast flow from NOAA GFS or ECMWF IFS, with an optional color field and a reading at map center. **Rain radar**, **Satellite clouds** and **Lightning density** are observations on one history timeline in the **WEATHER** panel (step back, **Play**, **Latest**); **Cyclone advisories** draw NHC and CPHC positions, forecast tracks and cones. On Google 3D Tiles the observed layers float above the city as translucent shells, sharpened around your view.
diff --cc build/vite.js
index 912d32b23,036311cc1..9c137a735
--- a/build/vite.js
+++ b/build/vite.js
@@@ -7,9 -52,9 +52,10 @@@ export function createBrowserViteConfig
publicDir,
googleApiKey,
cesiumToken,
+ mapillaryToken,
host = 'localhost',
port = 4173,
+ allowedHosts = DEFAULT_ALLOWED_HOSTS,
command,
} = {}) {
return {
diff --cc package.json
index 3b53e0324,94e83bf6f..18d8eb129
--- a/package.json
+++ b/package.json
@@@ -35,20 -35,20 +35,22 @@@
"doctor": "node scripts/setup-doctor.mjs",
"format": "node scripts/format.mjs --write",
"format:check": "node scripts/format.mjs --check",
- "layer-token:check": "node scripts/check-layer-state-tokens.mjs",
"layer-token:next": "node scripts/next-layer-state-token.mjs",
+ "layer-token:check": "node scripts/check-layer-state-tokens.mjs",
+ "dev": "vite",
+ "dev:secure": "./scripts/dev-secure.sh",
"opensky:import": "./scripts/opensky-import-client.sh",
+ "build": "vite build",
+ "build:panel": "node scripts/build-panel.mjs",
"preview": "vite preview",
+ "test": "node scripts/run-unit-tests.mjs",
+ "test:track": "node scripts/track-regression.mjs",
"qa:map-source-tray": "node scripts/qa-map-source-tray.mjs",
+ "qa:panel-resize": "node scripts/qa-panel-resize.mjs",
+ "qa:street-level": "node scripts/qa-street-level.mjs",
+ "check:boundaries": "node scripts/check-import-directions.mjs && node scripts/check-package-boundaries.mjs",
"qa:transit": "node scripts/qa-transit.mjs",
- "test": "node scripts/run-unit-tests.mjs",
- "test:track": "node scripts/track-regression.mjs"
+ "mcp": "node server/mcp/stdio.js"
},
"dependencies": {
"@jtarrio/signals": "^0.10.0",
@@@ -254,11 -253,9 +256,15 @@@
"./layers/transit/source": "./src/layers/transit/source.js",
"./sources/transit-service": "./src/sources/transitService.js",
"./sources/map-features": "./src/sources/overpassFeatures.js",
+ "./server/providers/mapillary": {
+ "node": "./server/providers/mapillary.js"
+ },
+ "./layers/street-level": "./src/layers/streetLevel/index.js",
+ "./layers/street-level/mapillary": "./src/layers/streetLevel/providers/mapillary/index.js",
- "./layers/street-level/mapillary/source": "./src/layers/streetLevel/providers/mapillary/source.js"
++ "./layers/street-level/mapillary/source": "./src/layers/streetLevel/providers/mapillary/source.js",
+ "./tools": "./src/tools/index.js",
+ "./tools/mcp": "./src/tools/mcp/index.js",
+ "./tools/services": "./src/tools/services.js",
+ "./view": "./src/view/index.js"
}
}
diff --cc server/standalone/vite.config.js
index 6991fff0f,6a8181490..a14292597
--- a/server/standalone/vite.config.js
+++ b/server/standalone/vite.config.js
@@@ -13,12 -16,16 +16,17 @@@ export default defineConfig(({ command
if (process.env[key] === undefined) process.env[key] = value;
}
return createBrowserViteConfig({
- plugins: [...localProviderPlugins(), apiNotFoundPlugin()],
+ plugins: [
+ ...localProviderPlugins({ realtime: { tools: standaloneVoiceTools() } }),
+ localMcpPlugin(),
+ apiNotFoundPlugin(),
+ ],
googleApiKey: process.env.GOOGLE_MAPS_API_KEY,
cesiumToken: process.env.CESIUM_ION_TOKEN,
+ mapillaryToken: process.env.MAPILLARY_CLIENT_TOKEN,
host: process.env.HOST,
port: process.env.PORT,
+ allowedHosts: resolveAllowedHosts(process.env.GEV_ALLOWED_HOSTS),
command,
});
});
diff --cc src/tooling/viteBuild.test.mjs
index 9952ad5cf,8ed4d1f9f..b9a1682ca
--- a/src/tooling/viteBuild.test.mjs
+++ b/src/tooling/viteBuild.test.mjs
@@@ -30,18 -38,19 +38,26 @@@ test('explicit build inputs preserve br
assert.deepEqual(config.define, {
'import.meta.env.GOOGLE_MAPS_API_KEY': '"browser-fixture"',
'import.meta.env.CESIUM_ION_TOKEN': '"ion-fixture"',
+ 'import.meta.env.MAPILLARY_CLIENT_TOKEN': '""',
});
+ assert.equal(
+ createBrowserViteConfig({ mapillaryToken: 'MLY|1|abc' }).define[
+ 'import.meta.env.MAPILLARY_CLIENT_TOKEN'
+ ],
+ '"MLY|1|abc"',
+ );
- assert.equal(
- createBrowserViteConfig({ host: '0.0.0.0', port: '4800' }).server
- .allowedHosts,
- true,
+ // A wildcard bind keeps the Host-header check; LAN names are explicit.
+ for (const host of ['0.0.0.0', '::'])
+ assert.deepEqual(
+ createBrowserViteConfig({ host, port: '4800' }).server.allowedHosts,
+ ['localhost', '127.0.0.1'],
+ );
+ assert.deepEqual(
+ createBrowserViteConfig({
+ host: '0.0.0.0',
+ allowedHosts: ['localhost', '127.0.0.1', 'globe.lan'],
+ }).server.allowedHosts,
+ ['localhost', '127.0.0.1', 'globe.lan'],
);
assert.equal(
createBrowserViteConfig({ host: '::', port: '4800' }).server.port,