import type { Slide } from "../shared/carousel.js";
export interface SnapshotContext {
    workId: string;
    /** video: seconds into the timeline. Omitted ⇒ current playhead (focus). */
    at?: number;
    /** carousel: slide id. Omitted ⇒ first slide. */
    slide?: string;
    /** Override for tests / non-default work roots. Defaults to ~/.autoviral/works. */
    worksRoot?: string;
}
export interface SnapshotResult {
    /** Absolute path of the PNG the agent should Read. */
    path: string;
    /** Which capture path produced it — lets callers/tests/UX disambiguate. */
    kind: "video-still" | "carousel-slide";
    /**
     * Whether the PNG actually contains the text/shape/sticker layers composited
     * over the base. true for a faithful render (video renderStill, or a real
     * exported carousel page). false for the carousel background-only fallback —
     * the agent must NOT infer text layout/overflow from such an image. Callers
     * (bridge/CLI) surface this so the agent knows what it's looking at.
     */
    textLayersComposited: boolean;
}
/**
 * Convert an asset reference for `workId` into a bare, work-RELATIVE subpath
 * (e.g. "assets/music/bgm.mp3"), or null if the reference is not an on-disk
 * same-work asset (a `data:`/`http(s):` URL points at no local file).
 *
 * Compositions store an asset src in EITHER form interchangeably:
 *   • served-URL  — `/api/works/<id>/assets/music/bgm.mp3`  (what the studio
 *     UI persists for preview, leading slash + per-segment encodeURIComponent)
 *   • bare-rel    — `assets/music/bgm.mp3`                  (what the agent
 *     writes via the CLI)
 * Both must resolve to the SAME on-disk file under the work dir. Callers that
 * need an absolute path do `resolve(workDir, assetUrlToWorkRel(id, src))` —
 * the leading slash on the served-URL form is what would otherwise make
 * `resolve` treat it as an absolute path OUTSIDE the work dir (the captions
 * `generate` default-src 400, E2E 2026-06-05).
 */
export declare function assetUrlToWorkRel(workId: string, value: string): string | null;
/**
 * Parse a slide background `bg.value` that points at a per-work asset and
 * return the asset-relative subpath (e.g. "assets/images/s1.png"), or null if
 * the value isn't a same-work asset URL (gradient/solid/external are not files).
 *
 * Accepts both the API form (`/api/works/<id>/assets/<rel>`) and a bare
 * relative path (`assets/images/x.png`), matching what the agent writes via the
 * carousel CLI (see ws-bridge buildSystemPrompt — assets/* relative paths).
 */
export declare function bgImageAssetRel(workId: string, bg: Slide["bg"]): string | null;
/**
 * Capture the current frame (video) or slide (carousel) as a PNG and return its
 * absolute path. The caller (bridge POST /snapshot) hands the path back to the
 * CLI, which prints it so the agent can Read it.
 */
export declare function renderSnapshot(ctx: SnapshotContext): Promise<SnapshotResult>;
//# sourceMappingURL=snapshot.d.ts.map