@koda-sl/baker-cli 0.201.0-dev.0a9adf6f7 → 0.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2442,16 +2442,15 @@ Get a single video by ID. `--full` includes the auto-generated **transcript** (B
2442
2442
  baker videos get j571abc123 --full --output md
2443
2443
  ```
2444
2444
 
2445
- ### `baker videos upload <file|url>`
2445
+ ### `baker videos upload <file>`
2446
2446
 
2447
- Upload a video. A local path is uploaded directly; an `http(s)` URL is routed to `baker videos ingest`.
2447
+ Upload a video file via Mux direct upload.
2448
2448
 
2449
2449
  ```bash
2450
2450
  baker videos upload ./demo.mp4
2451
2451
  baker videos upload ./demo.mp4 --dry-run
2452
2452
  baker videos upload ./testimonial-maria.mp4 \
2453
2453
  --context "Testimonial from Maria, a real customer, filmed on her phone for the autumn campaign"
2454
- baker videos upload https://www.youtube.com/watch?v=abc123
2455
2454
  ```
2456
2455
 
2457
2456
  Supported extensions: `.mp4`, `.mov`, `.webm`, `.avi`, `.mkv`
@@ -2469,41 +2468,6 @@ baker videos group --group-key "instagram:Cx7Ab9"
2469
2468
 
2470
2469
  Same lookup as `baker images group` and takes either kind of id; the two exist so the noun you happen to hold does not decide whether you can ask.
2471
2470
 
2472
- ### `baker videos ingest <url>`
2473
-
2474
- Add a video to the library from a link — a direct video file, or a page on YouTube, TikTok, Vimeo, or Instagram.
2475
-
2476
- ```bash
2477
- baker videos ingest https://cdn.example.com/hero-loop.mp4 # → { videoId, via: "direct" }
2478
- baker videos ingest https://www.youtube.com/watch?v=abc123 # → { videoId, via: "download" }
2479
- baker videos ingest https://vimeo.com/12345 --external-id vim:12345
2480
- ```
2481
-
2482
- Two routes, chosen from the URL and reported as `via`:
2483
-
2484
- - **direct** — the URL ends in a video extension, so Baker fetches the file itself. Nothing is downloaded locally and there is no size limit.
2485
- - **download** — anything else. The video is downloaded locally, stored, and then ingested. Capped at 2 GB.
2486
-
2487
- A direct URL that Baker cannot fetch retries automatically on the download route and reports `fallbackFrom`. Force the download route with `--download`.
2488
-
2489
- | Flag | Purpose |
2490
- |---|---|
2491
- | `--source` | Provenance: `url` or `youtube`. Inferred from the URL when omitted. |
2492
- | `--external-id` | Dedupe key — re-running the same link returns the existing video. Derived from the link automatically on the download route. |
2493
- | `--external-url` | Canonical page URL. Defaults to the input for a page URL. |
2494
- | `--download` | Skip the direct attempt and always download. |
2495
- | `--dry-run` | Preview the resolved route and parameters. |
2496
-
2497
- The download route caps the pull at 1080p — Baker re-encodes for streaming anyway, so fetching a 4K master (what modern YouTube serves by default) only makes the download slower for pixels that get discarded.
2498
-
2499
- **Blocked downloads climb the egress ladder automatically.** The download route goes through the same **direct → datacenter → residential** ladder as every other outbound read (`@baker/proxy`; see [Operations](../../docs/operations.md) → Egress Proxy). There is no proxy flag on any command and nothing to opt into — the unproxied attempt always runs first, so a paid exit costs nothing until a host actually refuses us, and with no `OXYLABS_*` credentials in the environment this is a single plain download.
2500
-
2501
- A rung only opens on evidence that *who we are* was the problem — a 403/429/451, a WAF connection reset, or a bot wall like YouTube's "Sign in to confirm you're not a bot". A private video, a deleted one, a 404 or an unsupported URL fails identically from every address on earth, so it stops after one attempt instead of burning a timeout per tier. That decision is `shouldEscalate`'s, shared with the capture engine and the ad-media downloaders; yt-dlp's stderr is only *parsed* into the signal it takes (`src/lib/ytDlpSignal.ts`), never allowed to judge for itself.
2502
-
2503
- Requires `yt-dlp` on `PATH` (present in the Baker Runtime). Private, age-restricted, or region-locked videos cannot be downloaded — the error carries a `fix` pointing at `baker videos upload <file>`.
2504
-
2505
- **yt-dlp goes stale, and that looks like a broken video.** Large platforms change their players every few weeks and an out-of-date `yt-dlp` then resolves *no* formats at all, failing with "Requested format is not available" or "Only images are available" rather than anything that names the real cause. The error classifies this case separately and says the link is probably fine. The Runtime image installs `yt-dlp` unpinned at build time (`packages/e2b-template/src/template.ts`), so it ages with the image — if platform ingests start failing across the board, rebuild the template before investigating anything else. Direct file URLs don't depend on `yt-dlp` at all and keep working regardless.
2506
-
2507
2471
  ### `baker videos delete <id>`
2508
2472
 
2509
2473
  Delete a video by ID.
@@ -4596,6 +4560,19 @@ $ baker canvas validate my-canvas.json
4596
4560
 
4597
4561
  On error you get an array of `ValidationIssue`s, each with `path`, `code`, `message`, and optional `did_you_mean`.
4598
4562
 
4563
+ **Absolute asset paths are healed, not reported.** A `source: "path"` ingest (or a `hyperframe_render`
4564
+ composition) written as an absolute path inside the workspace is rewritten to its canvas-relative form
4565
+ and the canvas file is saved, before anything else reads it. `normalized_paths` lists what changed.
4566
+ `run` does the same and logs it. This is not cosmetic: an absolute path resolves in the Runtime that
4567
+ wrote it, so validate, run, and the preview all pass, and only the publish build — a different checkout
4568
+ root, a different session — ever sees the break.
4569
+
4570
+ Two roots count as "this workspace": the current one, and `/home/user/repo` (`REPO_PATH`), the fixed path
4571
+ every Session's workspace is checked out at. A path under either names the same file in any checkout, so
4572
+ remapping it is a proof rather than a guess — which is what lets an already-committed canvas heal in the
4573
+ publish build instead of blocking it. Anything under a root that maps to neither is left alone, and the
4574
+ scaffold's `validate-creatives` gate still rejects it.
4575
+
4599
4576
  Advisory (warning-severity) video invariants include `VIDEO_PROMPT_DECISION_MISSING` (a thin clip prompt that
4600
4577
  names no camera/motion move **and** no exclusions — the six-decision doctrine) and `VIDEO_HOOK_LAYER_MISSING`
4601
4578
  (the hook, scene 0, is thin across two or more of the four hook layers — text/sound/visual/vibe). Warnings never
@@ -5303,7 +5280,7 @@ baker landing inspiration scrape <url> --out <dir> # capture any page now, syn
5303
5280
  ```
5304
5281
 
5305
5282
  - **Hybrid search over three signals** — keywords, meaning, and *appearance* (the screenshot is embedded, so a query like "dark developer hero with a terminal" can match a section whose text never says "terminal"). Filters: `--type --composition --register --interaction --motion --media --device --theme --max-rank --min-craft --min-fidelity --domain --similar-to --scope --limit`.
5306
- - **Screenshots are downloaded to `.baker/inspiration/`** so an agent can actually look at a result rather than read a description of it.
5283
+ - **Screenshots are downloaded to `.baker/inspiration/`** so an agent can actually look at a result rather than read a description of it — downscaled to the page's own design width (1440px, WebP) rather than the 2x archive capture R2 holds. A vision model bills by pixel area and downsamples past its own long-edge cap anyway, so the extra resolution bought no legibility and cost context on every one of the eight hits a default search returns.
5307
5284
  - **`fidelity` says how much to trust the code.** A measured 0–1 match between the live section and our standalone re-render, always reported. Above ~0.95 the markup renders like the original; below ~0.75 the section is scroll- or JS-driven and it does not.
5308
5285
  - **`used_on_pages`** appears when a section shows up on more than one of that site's pages — a nav or footer they ship everywhere, which is a stronger reference than a one-off.
5309
5286
  - **The corpus is shared across companies; favorites are per-company**, and search defaults to this company's saved sections.