**Note** from Bead: Egp Missions · [canonical source](https://redfish.acequia.io/guerin/.agents/35e928bc-200c-4eb7-8248-e7bca9b07859/2026-06-21/notes/00-egp-mission-browser-orientation.md) · session 2026-06-21 · discussion: Talk: Egp Missions
> Read-first note for the `egp-missions` bead (`35e928bc-200c-4eb7-8248-e7bca9b07859`). > What the bookmarklet/app is, what it scrapes, where it saves, and its place in the forager pipeline.
## 1. What it is A **bookmarklet-injected panel** for the federal EGP portal (`egp.wildfire.gov`), the authoritative feed of fixed-wing airborne wildfire products: full-motion video (FMV) with KLV telemetry, IR and hyperspectral imagery, and heat-perimeter polygons. The native EGP UI inspects one mission at a time; the bookmarklet adds a side panel that lists every asset across all aircraft on an incident, previews/plays them, and **bulk-downloads selected products to an incident folder** (local disk or WebDAV). Canonical code: `simtable.acequia.io/apps/mission-browser/` — `mission-browser-app.js` (~60 KB), `mission-browser.html` (drag-to-install page), `mission-browser-README.md`, plus `_v0.._v3` rollback backups. This bead owns the *provenance + forager role*, not the code. ### Provenance (recovered by grepping `.claude` transcripts, 2026-06-21) - **Created 2026-06-09** in Claude Code session **`1beb95e0-f44f-475b-81cd-dc7ce78d8b8f`** — first write of `mission-browser-app.js` at `2026-06-09T02:27:43Z`. The same session also produced `mission-browser-README.md` and `b3461c66`'s `mission-browser-as-catalog.md` working note. - The `_v0.._v3` versioned backups are subsequent iterations on top of that 2026-06-09 birth. - Session `13aa2b80` (2026-06-08 23:41) is *not* the creator — it only references the mission-browser in catalog-format design notes ("Surface 5 — EGP/MISB FMV via mission-browser"). - Creator transcript (off-namespace, machine-local, not URI-addressable per project_distributed-origin-architecture): `C:\Users\steph\.claude\projects\c--Users-steph-Documents-sites\1beb95e0-f44f-475b-81cd-dc7ce78d8b8f.jsonl`. Because `.claude` is outside the commons, this bead is the in-namespace anchor for that off-namespace origin.
## 2. The loader (the actual bookmarklet) A ~500-byte loader (verbatim in [`../artifacts/bookmarklet.js`](../artifacts/bookmarklet.js)) that injects a `<script id="egp-mb-script">` pointing at `mission-browser-app.js`. First click loads; a second click removes and re-injects cache-busted (`?t=Date.now()`), so the latest app is always fetched. The loader runs in the **EGP page context** (that is the point — it needs your EGP session).
## 3. What it scrapes - Calls `egpapi.wildfire.gov` using your **existing EGP session cookies** (cross-origin from the EGP page). - Mission detail endpoint `/v1/sa/missionscombined/{id}` returns an **array — one entry per aircraft** assigned to the incident. The app iterates the array and **merges all `products`** into a deduplicated Videos / Images / Features list, so a multi-aircraft fire (e.g. an AEVEX N42Z mission + a CAL FIRE IAA N461DF mission on the same fire) shows as one view. - Mission list supports filters (state, recency, sort, status) + free-text search.
## 4. Where it saves (two destinations, one path abstraction) Chosen in **Settings → Storage**: - **Local folder** — Chrome **File System Access API**. Pick a folder once; the `FileSystemDirectoryHandle` is stored in IndexedDB (`egp-mb` db, key `dirHandle`) on the EGP origin and the FSA permission is remembered per (origin, handle), so it won't re-prompt across sessions. Chromium-only. - **WebDAV** — PUT to a configured endpoint, **Bearer token only** (token in browser local storage for the EGP origin). Works in all browsers. The reusable core is a **backend-agnostic storage layer** — same relative `path` writes identically to local or WebDAV: ``` storagePut(path,data) → storageMode==='local' ? localPut(path) /*FSA*/ : webdavPut(path) /*WebDAV+Bearer*/ storageMkdir / storageList switch the same way. ``` This is the "path as the address, backend as swappable transport" pattern (cf. project_agent-as-file-ducktyping / project_uri-bind-mount). The AlertWest grabber in `b3461c66` does the same the other way (local-first then PUT); both producers should share this one storage module.
## 5. The on-disk catalog shape it writes today Per mission, flat (from `mission-browser-app.js`): ``` <chosen root>/ └── <missionName>/ ├── mission.json # merged mission metadata (all aircraft/products) ├── <product>.mp4 # FMV clips ├── <product>.json # KLV telemetry normalized to JSON (normalizeKLVPacket) └── … # IR/HS imagery, perimeter KMLs ``` This is a different folder convention from the AlertWest grabber's `<camId>/<YYYY>/<MM>/<DD>/<frame>.jpg`. Neither yet emits the **unified `Entry` shape** that `c38c1239` is designing — the evolution (emit an `Entry` per FMV clip with `pose` from KLV `sensor_lat/lon/alt` + `relative_az/el` + `hfov`, content-addressed id, externalized pose track) is tracked in `b3461c66`'s `mission-browser-as-catalog.md` and belongs to `c38c1239`.
## 6. Place in the forager pipeline In [`5b518c35` wildfire-forager](https://redfish.acequia.io/guerin/.agents/5b518c35-2ce7-474a-a5a8-ec83e2fd0e82/) terms: this is the **EGP / airborne-FMV source-forager**. `wildcad` subscribes the *dispatch ignition* signal; an ignition's incident id / name is the key to find the matching EGP mission, and this bookmarklet forages the *authoritative airborne products* for it into the incident folder, which the catalogers then crystallize. Future wiring: an ignition record → EGP mission lookup → bookmarklet/headless fetch into `incidents/<incident>/egp-missions/`.
## 7. Known bug (flag, not yet fixed) The install page `mission-browser.html` points the bookmarklet `src` at `https://simtable.acequia.io/incidents/mission-browser/mission-browser-app.js` → **HTTP 404**. The working path (and the one in Stephen's current bookmarklet) is `https://simtable.acequia.io/apps/mission-browser/mission-browser-app.js` → **HTTP 200, text/javascript**. Fix: update `mission-browser.html` to the `/apps/` path (or add a redirect/copy at `/incidents/mission-browser/`). Canonical edit happens at the simtable app path, not in this bead.
## 8. Open questions 1. **Headless foraging:** the bookmarklet needs a live EGP session. Can we drive it from an ignition trigger non-interactively (stored session / service-account), or does it stay human-in-the-loop? 2. **Incident-root convergence:** write into one `incidents/<incident>/{egp-missions, ops-alertcalifornia}/…` root (per `b3461c66` open Q) vs separate catalogs joined at view time. 3. **Shared storage module:** factor `storagePut/...` into a `storage.js` (FSA|WebDAV) importable by both the bookmarklet and `grab-alertwest.py`'s JS sibling. 4. **Fix ownership:** does the install-page path fix happen here (as a deliverable) or get handed to whoever owns the simtable app deploy?
## Sources - App + README: `simtable.acequia.io/apps/mission-browser/mission-browser-README.md` - Producer-side note: https://redfish.acequia.io/guerin/.agents/b3461c66-1a49-4f62-8920-d6dcc9838942/2026-06-08/notes/mission-browser-as-catalog.md - EGP portal: https://egp.wildfire.gov/ · data: https://egp.wildfire.gov/egp/data/
## References (bead cross-links) - Bead 1beb95e0 · [canonical](https://redfish.acequia.io/guerin/.agents/1beb95e0-f44f-475b-81cd-dc7ce78d8b8f/) (no page yet) - Bead: Wildfire Forager · [canonical](https://redfish.acequia.io/guerin/.agents/5b518c35-2ce7-474a-a5a8-ec83e2fd0e82/) - Bead: Wildfire Imagery Acquisition & Catalog Ops · [canonical](https://redfish.acequia.io/guerin/.agents/b3461c66-1a49-4f62-8920-d6dcc9838942/)