Files
hyperframes/packages
ukimsanov 953004b958 fix(capture): strengthen asset-descriptions.md fallback when Gemini key absent
User context: not every team has GEMINI_API_KEY set. Without it, the
asset-descriptions.md fallback previously degraded to near-useless lines
like `svgs/svg-54ea56cd.svg — icon: 54ea56cd` — just the content-hash
slug, no signal for finding the real logo. This commit makes the
no-Gemini path materially more useful by surfacing the new structural
LOGO signals (committed in 02f95f95) into the asset-descriptions output.

contentExtractor.ts changes:

1. Downloaded-image branch (lines 350-393): compute `isLikelyLogo` from
   catalog signals (inBanner / inHomeLink / matchesTitleBrand + the
   existing alt/heading/section substring patterns). When true, prepend
   a literal `LOGO` token to the description line. Applied to BOTH the
   Gemini-captioned path (so the LOGO tag rides alongside the rich
   Vision caption) and the catalog-fallback path. Single grep target
   for agents: `grep "LOGO" capture/extracted/asset-descriptions.md`.

2. Inline-SVG branch: bumped the case-sensitive prefix to `LOGO:` to
   match the new convention. Filename-based check now leads with
   `file.startsWith("logo-")` because the broadened isLogo detection
   in 02f95f95 makes that prefix the most reliable signal — the
   logo-<hash>.svg naming is owned by the capture pipeline and is
   trustworthy by construction.

index.ts (asset-descriptions.md writer) changes:

3. The file header is now branched by Gemini-key presence:
   - With key: brief instruction + "search for the brand name here
     BEFORE composing a logo" pointer.
   - Without key: explicit ⚠️ banner naming the degraded mode,
     listing what the catalog-fallback signals catch, AND a fallback-
     of-the-fallback instruction: "open the LOGO-tagged SVGs in a
     previewer or sharp-render them to PNG before referencing — the
     alternative (composing a fake logo) ships off-brand in the final
     video." This is the same brand-fidelity rule the doc landmine
     (commit e6aa7fed) lays down, repeated here so it's discoverable
     from inside the no-Gemini-mode file itself.

4. progress() message also reports the catalog-fallback mode when no
   Gemini key, so users running capture interactively see a status hint.

Net: teams without a Gemini key now get:
- LOGO-tagged lines they can grep for (catches the heygen wordmark
  and the huly favicon via the structural signals).
- A header that names the degraded mode + tells agents to fall back
  to opening / rasterizing SVGs when descriptions are too weak.
- Stable contract: the LOGO token works identically with or without
  Gemini, so the skill's discovery rule (e6aa7fed) is honored in
  both modes.

Final piece of the bundle: capture/video-manifest already lists every
<video> URL but doesn't download. Followup commit adds an on-demand
download path so the heygen "Orb" hero (or any other captured video)
is one CLI invocation away rather than a manual curl.
2026-06-12 01:09:31 -07:00
..
2026-06-11 02:40:36 +00:00
2026-06-11 02:40:36 +00:00
2026-06-11 02:40:36 +00:00
2026-06-11 02:40:36 +00:00
2026-06-11 02:40:36 +00:00
2026-06-11 02:40:36 +00:00