Skip to content

flight-tracking-demo: live progress streaming, one-call goto-analyze, multi-provider feed - #64

Open
tklawa-nvidia wants to merge 8 commits into
brevdev:mainfrom
tklawa-nvidia:feat/flight-tracking-live-progress
Open

flight-tracking-demo: live progress streaming, one-call goto-analyze, multi-provider feed#64
tklawa-nvidia wants to merge 8 commits into
brevdev:mainfrom
tklawa-nvidia:feat/flight-tracking-live-progress

Conversation

@tklawa-nvidia

Copy link
Copy Markdown

Summary

  • Live agent progress streaming. openclaw agent --json is batch and only flushes its session file at the end, so the chat UI previously showed "Agent working…" then dumped everything at once. We now tap the agent's own loopback tool calls (allowlisted /api/map/*, /api/analyze, /api/flight/…) and emit progress events on /api/chat/stream, driving a live status line ("Centering the map…", "Analyzing traffic around IAD…") that shows regardless of the trace toggle.
  • One-call goto-analyze. New POST /api/map/goto-analyze performs the map move and returns the traffic analysis in a single response, cutting a model round-trip for the common "go to X and analyze" request. SKILL recipe updated to always use it.
  • Multi-provider live feed. GET /api/sources, POST /api/map/source, and a provider query param let the operator/agent switch the live-aircraft source. opensky-proxy.py now defaults to community ADS-B aggregators (adsb.fi / airplanes.live / adsb.lol) to route around OpenSky's cloud-IP blocking, with a per-request provider override.
  • Brev secure-link forward. install.sh + a systemd template add a reboot-safe 0.0.0.0 forward for Brev secure links alongside the loopback tunnel.
  • SKILL hardening. Multi-provider guidance, the goto-analyze recipe, and tightening against unnecessary skill-file reads.

Test plan

  • ./install.sh on a fresh sandbox; confirm map, live aircraft (community feed), and Brev secure link.
  • Chat: "go to IAD and analyze traffic" → single goto-analyze call + live progress status updates.
  • Toggle the data-feed selector; confirm map + agent analysis both switch feeds.
  • Verify browser /api/flights polling does NOT appear in the chat progress feed (allowlist).

…alyze, multi-provider feed

- app/server.py: add POST /api/map/goto-analyze (map move + traffic analysis in one
  response) to drop a model round-trip; stream live progress on /api/chat/stream by
  tapping allowlisted loopback tool calls and emitting `progress` events, so the chat
  UI shows real-time status instead of one post-turn dump; add multi-provider live feed
  (/api/sources, POST /api/map/source, provider query param).
- app/static: data-feed selector + capability notes; live "Agent working…" status line
  driven by progress events (shown regardless of the trace toggle).
- opensky-proxy.py: default to community ADS-B aggregators (adsb.fi/airplanes.live/
  adsb.lol) to route around OpenSky cloud-IP blocking; per-request provider override.
- install.sh + scripts/systemd: reboot-safe Brev secure-link forward (0.0.0.0) plus the
  loopback tunnel.
- skills/flight-tracking/SKILL.md: goto-analyze recipe, multi-provider guidance, tighten
  against unnecessary skill-file reads.
…start

- opensky-proxy: when OpenSky is unreachable (blackholed from cloud IPs),
  transparently fall back to the community ADS-B feeds and tag the response
  (X-Flightops-* headers + source/requested/fallback body fields); short
  negative-cache so opensky-mode polls stay snappy.
- server: relay the served source + fallback state through /api/flights,
  /api/sources and /health.
- UI: show "OpenSky unavailable — showing community feed" banner instead of
  going blank/offline when a fallback is active.
- install.sh: friendly live-feed onboarding wizard (community no-creds vs
  OpenSky+creds) on interactive installs; safe community default otherwise.
- install.sh/start.sh: free the app port on (re)start via fuser + /proc scan
  so a reinstall reliably serves fresh code instead of a stale uvicorn.
… counter

- opensky-proxy: OPENSKY_EGRESS_PROXY routes OpenSky token-mint + API calls
  through a non-datacenter hop (http/https/socks5h) so a cloud VM can reach
  OpenSky despite its pre-auth source-IP blackhole; community feeds keep
  going direct. Degrades gracefully to direct (→ community fallback) if a
  SOCKS URL is set without PySocks.
- install.sh: document OPENSKY_EGRESS_PROXY and pass it through to the proxy.
- UI: live elapsed counter next to "Agent working…" so long silent turns
  visibly tick instead of looking frozen.
- SKILL.md / flight-tracking-guide.md / fly: docs + helper refinements.
Strip benign node/undici stderr warnings and surface the real cause on a
non-zero `openclaw agent` exit: friendly hints for inference-infra errors
(ResourceExhausted / worker request limit / chain_exhausted), else the
error the agent echoed on stdout, else de-noised stderr — so users stop
seeing "EnvHttpProxyAgent is experimental…" in place of the actual error.
The old favicon was a thin airplane glyph on a transparent background, so at
16px tab size it was effectively invisible. Replace it with a bold filled
badge — an NVIDIA-green gradient rounded square with a white plane silhouette —
matching the visual weight of the BoatOps favicon. Cache-bust the references.
@tklawa-nvidia
tklawa-nvidia force-pushed the feat/flight-tracking-live-progress branch from 61bc19f to 64fbb9c Compare July 24, 2026 19:32
install.sh uploaded index.html/styles.css/app.js/airports.json but not
favicon.svg, so /static/favicon.svg 404'd in the deployed app and the browser
tab showed no icon. Add the missing upload line.
The pre-bind cleanup in start.sh and install.sh reaped every process whose
command line matched "uvicorn server:app". The boat and satellite demos run
that same command and differ only by --port, so installing or restarting
FlightOps took them down too. Scope both to this demo's own port.
These changes were live in the running proxy but had never been committed, so
the tree still held the single-query version. Community ADS-B aggregators cap
each query at a 250 nm radius, so one request for a continental bounding box
only returned aircraft near its centre — hence the lone cluster over Texas
instead of coast-to-coast coverage.

opensky-proxy.py now splits the bbox into up to 16 overlapping circular tiles,
fetches them concurrently across providers, and merges/dedupes by icao24
keeping the freshest sighting. A 45 s per-tile cache plus a 9 s wall-clock
deadline bounds latency: results seed from stale cache, fresh tiles overlay as
they land, and slow tiles keep warming the cache for the next refresh.

Default zoom goes 3.4 -> 5.0 so the initial view is densely covered rather
than spreading the tile budget across the whole continent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant