export type ClaudeMirrorStatus = /** No mirror candidate at all (no proxy configured, or a non-mirrorable url). */ 'absent' /** Probing the host for a self-hosted mirror (or minting one on first view). */ | 'probing' /** A mirror exists and `src` points at it. */ | 'found'; export interface ClaudeMirrorState { /** The mirror src when found (with a cache-bust once a re-publish is * detected), else `null`. */ src: string | null; status: ClaudeMirrorStatus; } /** * The host's SELF-HOSTED MIRROR src for a claude artifact url, plus a * `status` so the viewer can show a loading state while it resolves — THE * hook behind `ClaudeEmbed`'s transparent mirror leg, extracted so the * component stays presentational. * * Fully under the hood, three moves: * 1. Derive the candidate mirror path from the url's artifact id under the * host's configured storage-view proxy base * (`EndpointsRuntime.storageViewBaseUrl`) and probe it with a 1-byte * ranged GET. On a cold first view that probe IS the server-side * self-heal (~1-2s), which is exactly why `status: 'probing'` exists — * the viewer shows a spinner instead of the empty "no embeddable view" * flash. Exists → `found`; missing / no proxy / blip → `absent`, and the * caller's claude.ai fallback stands (the pre-mirror behavior). * 2. Once found, fire ONE background revalidation. If the artifact was * re-published since the mirror was cached, the server re-mints it and * reports the new version; the hook bumps a cache-bust on `src` so the * iframe silently reloads the fresh bytes. Unchanged → nothing happens. * * A host that mounts no EndpointsRuntime provider (or omits the entry) skips * the mirror leg entirely (`absent`). */ export declare function useClaudeMirrorSrc(url: string): ClaudeMirrorState; //# sourceMappingURL=use-claude-mirror-src.d.ts.map