Thin routing shim that directs content-surface HTTP requests through the embed auth adapter when one is registered, or falls back to a plain `fetch` otherwise. ## Key Components ### `contentFetch` A `typeof fetch`-compatible function used by all self-fetching content surfaces (roadmap, delivery, product releases, onboarding guides, legal docs, release-detail injected sections). Routes requests based on adapter presence: - **Adapter registered** → delegates to `embedAuthedFetch`, which attaches bearer tokens/cookies and handles 401 refresh — the same auth path used by the embedded chat. - **No adapter** → returns a plain, unmodified `fetch` call. Internally coerces the full `RequestInfo | URL` input shape down to a plain string URL, since `embedAuthedFetch` accepts only strings. Handles all three input variants (`string`, `URL`, `Request`) defensively, even though content surfaces always pass strings in practice. ## Usage Example ```typescript // After wiring the embed auth adapter once for the chat surface, // all content fetches automatically inherit the same auth: import { contentFetch } from './embed-content-fetch' // Used internally by content surfaces — no configuration needed const response = await contentFetch('/api/roadmap/items', { method: 'GET', headers: { 'Content-Type': 'application/json' }, }) const data = await response.json() ``` > Hosts register auth **once** via `EmbedAuthAdapter` for the chat surface; `contentFetch` inherits it automatically with no additional setup required. ## Source [`embed-content-fetch.ts`](https://github.com/flamingo-stack/openframe-oss-lib/blob/main/embed-content-fetch.ts)