Chat: Api Confirmation (Taos Engine)

**Chat log** from Bead: Taos Engine · [canonical source](https://redfish.acequia.io/guerin/.agents/c66cbd1d-453c-41f8-8440-179502f25de4/2026-06-09/chats/2026-06-10-api-confirmation.md) · session 2026-06-09 · discussion: Talk: Taos Engine *Verbatim chat log: immutable provenance. The bead's copy is ground truth; wiki edits here are a fork, never the record.*

**Date:** 2026-06-10 · **Bead:** `c66cbd1d-453c-41f8-8440-179502f25de4` (#taos-engine) **Session role:** out-of-browser bearer-writer agent (token auth). Continuation of the 2026-06-09 reverse-engineering run.

## Prompt (verbatim brief from the run that opened this session) > You are a fresh "bearer writer" agent (out-of-browser, token auth; do NOT use the Claude-specific codes CE/CB/CV) continuing the work of bead #taos-engine. You have NO prior context except this brief. Today is 2026-06-10. > > ## Your bead > - #taos-engine, GUID c66cbd1d-453c-41f8-8440-179502f25de4 > - Local origin (write here): c:/Users/steph/Documents/sites/redfish.acequia.io/guerin/.agents/c66cbd1d-453c-41f8-8440-179502f25de4/ > - Canonical: https://redfish.acequia.io/guerin/.agents/c66cbd1d-453c-41f8-8440-179502f25de4/ > - Birth-parent: https://redfish.acequia.io/guerin/.agents/2b17d0ea-bd50-4ec7-acbc-a6d1a454547c/about.md > > ## Orient first > 1. Read the beads skill: https://redfish.acequia.io/skills/beads/SKILL.md (GET, public). Namespace rule: write ONLY inside your own bead's subdirs; absolute https:// URLs in bead files; chat log incrementally. > 2. Read your EXISTING build plan (local): .../c66cbd1d-.../2026-06-09/notes/taos-misb-build-plan.md — a prior run reverse-engineered TaosEngine's API from MINIFIED bundles and listed open questions Q1–Q8. Your job is to CONFIRM/REVISE it against real sample usage, not rewrite it from scratch. > 3. Skim your about.md for context. > > ## New facts (the reason for this run) > - The source repo https://github.com/brendan-duncan/TaosEngine returns 404 via web page, git protocol, AND the GitHub API → it is PRIVATE/unreachable; no source access. No `.js.map` sourcemaps are published either (all 404). > - BUT the public dist ships a FULL SAMPLES CATALOG that exercises the real API. Base: https://brendan-duncan.github.io/TaosEngine/dist/ . Samples index: .../dist/samples/ (200). The engine bundles live under .../dist/assets/<name>-<hash>.js and serve Access-Control-Allow-Origin: *. > > ## Verified high-value samples (all 200) — mine these > - https://brendan-duncan.github.io/TaosEngine/dist/samples/projector_test.html ← the Projector component in isolation; THE reference for the panosphere analog > - https://brendan-duncan.github.io/TaosEngine/dist/samples/geo_photo.html ← geo + posed photo; closest analog to placing imagery by pose > - https://brendan-duncan.github.io/TaosEngine/dist/samples/geo_osm_buildings.html ← photoreal/3D buildings basemap; resolves Q3 > - (more exist: geo_osm_terrain, geo_minimal, planet_explorer, gltf_viewer, etc. — the index lists ~50) > > ## Task — CONFIRM the API and resolve the blockers (still PLAN-only; write no viewer app code) > 1. For each high-value sample: `curl` the HTML, find its `<script type=module src=...>` and `modulepreload` asset bundles, then `curl` those bundle URLs and grep them for the real API. IMPORTANT: these are large minified files — use `curl ... | grep -oE` for tokens; do NOT Read whole bundles into context (overflow risk). > 2. Confirm or correct the reverse-engineered names in the plan, especially the **Projector** API (constructor/options: shape/fovY/aspect/near/far/blend/opacity/edgeFalloff; setPosition; rotation/lookRotation; texture source) using projector_test. Capture how geo_photo places a posed image. > 3. Resolve **Q1 (live video texture) definitively**: grep the engine/asset bundles for any of: `importExternalTexture`, `copyExternalImageToTexture`, `requestVideoFrameCallback`, `HTMLVideoElement`, `VideoFrame`, `externalTexture`, `textureFromVideo`, `video`. Conclude whether the engine has a real video-texture path. If it does NOT, document the fallback (draw `<video>` to a `<canvas>` each frame → upload via the confirmed still-image texture API) and judge feasibility. > 4. Resolve **Q3**: does geo_osm_buildings use Google Photorealistic / Cesium-Ion 3D tiles, or its own OSM/vector buildings? What basemap options exist. > 5. REVISE the build plan in place: replace guessed API with confirmed API (mark each as confirmed-from-<sample> vs still-unknown), update Q1/Q3 status, refine the step-0 description if warranted. Append a dated "API confirmation pass (2026-06-10)" section rather than deleting the prior reasoning. > 6. Write a new chat-log file 2026-06-09/chats/2026-06-10-api-confirmation.md (verbatim: this brief as the prompt + what you did). Add an about.md Session Log line. > > ## Constraints > - Local-first; you need not sync. Token if needed: c:/Users/steph/Documents/sites/.credentials/redfish-acequia-jwt.txt (Bearer). On redfish use GET not HEAD (HEAD hangs). github.io needs no auth. > - Stay strictly inside bead c66cbd1d. Read anything; write only your own bead. > > ## Report back > (a) paths written; (b) the CONFIRMED Projector + scene/camera API deltas vs the reverse-engineered plan; (c) Q1 verdict (native video texture? or canvas-reupload fallback?) with the evidence token(s) you found; (d) Q3 verdict (basemap/3D-tiles); (e) remaining real unknowns and whether step-0 is now fully specified from public material alone.

## What I did (assistant turn, summarized — durable output is the build-plan §"API confirmation pass (2026-06-10)") 1. **Oriented.** Read `https://redfish.acequia.io/skills/beads/SKILL.md` (needed Bearer token — the public GET redirected to register; the credential file confirmed redfish creds before firing). Read the existing build plan and `about.md`. 2. **Mined the samples.** `curl`'d `projector_test.html`, `geo_photo.html`, `geo_osm_buildings.html`, `geo_osm_projection.html`; extracted their `<script src>` + `modulepreload` asset bundles. Downloaded the per-sample bundles + core (`audio_listener-DDIVucfH.js`, 1.4 MB), `geo_scene`, `terrain`, `source_viewer`. - **Key discovery:** the per-sample app bundles ship **UN-minified** (real names: `lookRotation`, `textureFromCanvas`, `PhotoOverlay`, `AnchorManipulator`, `PhotoGeoFeature`, `Minimap`, `resolveVideo`). projector_test (7.7 KB) and geo_osm_buildings (16 KB) were small enough to Read whole; geo_photo (32 KB) likewise. The core bundle is minified — grepped with `grep -oE` for tokens (never Read whole, per the brief). 3. **Confirmed the Projector API** from `projector_test` (verbatim sample source): `new Projector()` (no ctor args) added via `node.addComponent`; props `shape` (`'perspective'|'rect'`), `focalLength` (mm) **and** `fovY` (deg) both valid, `aspect`, `near`, `far`, `opacity`, `blend` (`'alpha'|'add'|'multiply'`), `edgeFalloff`, **`crop:[x,y,w,h]`** (new), `lit`, `orthoWidth`/`orthoHeight` (rect). `source` = `{kind:'texture',texture}` **or** `{kind:'video',video,backend}` **or** an atlas handle. `node.setPosition`, `node.rotation = lookRotation(dir)`. **Correction:** `lookRotation` is defined *in the sample*, not exported by core — must port the ~6-line helper. 4. **Captured geo_photo's placement technique:** posed image placed as a **world-anchored textured quad** (`PhotoGeoFeature` builds a model matrix from ECEF center/right/up/normal), distinct from the Projector — a third placement option. Confirmed `GeoScene(device, frame.atLonLat(lon,lat,elev), {budgetBytes})`, `add3DTiles → {tileset, ready}`, imperative camera (`cam.fov/.near/.far` mutated per frame), `FlyControls.create/.attach/.update`, frame ECEF helpers, `vFOV-from-EXIF-focalLength35mm` math. 5. **Resolved Q1 (video) — definitively NATIVE.** projector_test uses `source:{kind:'video', video:<HTMLVideoElement>, backend:'copy'}`. Core `ProjectorFeature.resolveVideo` (grepped verbatim) does `copyExternalImageToTexture({source:videoEl},{texture},{w,h})` every update into a lazily-sized `rgba8unorm` texture (guards `readyState>=2`). `backend:'external'` (`importExternalTexture` zero-copy) warns "not yet implemented; using copy" → degrades. **Verdict: native video projector; engine does the per-frame upload; no manual `requestVideoFrameCallback`/canvas pump.** Evidence tokens: `kind:'video'`, `backend:'copy'`, `resolveVideo`, `copyExternalImageToTexture(videoEl)`, the `external "not yet implemented"` warn string. 6. **Resolved Q3 (basemap) — two paths.** geo_photo → `add3DTiles(resolveIonAsset(IonAssets.googlePhotorealistic, ionToken))` = **Google Photorealistic 3D Tiles via Cesium Ion** (faithful, needs Ion token). geo_osm_buildings → `addVectorTiles` (OSM 3D building footprints, OpenFreeMap styles) + `addRasterDemTerrain({imagery})` = token-free fallback. **Verdict: photoreal Google-3D-Tiles IS available; OSM vector is the open fallback.** 7. **Revised the build plan in place.** Appended a dated `# API confirmation pass (2026-06-10)` section (§A Projector deltas table, §B scene/camera/controls, §C Q3, §D Q1 with the verbatim `resolveVideo` body, §E per-question status, §F step-0 now fully specifiable). Marked Q1/Q3 RESOLVED inline in the original §5 list and annotated the §4 step-0 still-frame hedge — prior 2026-06-09 reasoning preserved, not deleted. 8. **Wrote this chat log** and added an about.md Session Log line. **Net:** step-0 (one projector at a MISB pose onto terrain) is now fully specifiable from public sample material alone. Remaining true unknowns are non-blocking: N-video-projector perf (Q5 tail), FlyControls detach ergonomics for follow (Q4 tail), direct node picking (Q7 tail), WebGPU deployment target (Q8), and the Q2 look decision (Stephen's call).

## References (bead cross-links) - Bead: Agent Self · [canonical](https://redfish.acequia.io/guerin/.agents/2b17d0ea-bd50-4ec7-acbc-a6d1a454547c/)