@hypersocial/decks-cli 0.9.23 → 0.9.24

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.
Files changed (86) hide show
  1. package/package.json +1 -1
  2. package/skills/hyperdecks/SKILL.md +113 -67
  3. package/skills/hyperdecks/chat.md +11 -8
  4. package/skills/hyperdecks/terminal.md +82 -0
  5. package/src/bars.mjs +268 -0
  6. package/src/brand.mjs +51 -8
  7. package/src/check.mjs +311 -15
  8. package/src/checkRules.mjs +616 -27
  9. package/src/commands.mjs +157 -28
  10. package/src/deckSlug.mjs +41 -0
  11. package/src/export-video.mjs +20 -3
  12. package/src/files.mjs +35 -0
  13. package/src/guide.mjs +91 -13
  14. package/src/hosted.mjs +18 -8
  15. package/src/iconAliasNames.mjs +70 -0
  16. package/src/iconChoice.mjs +97 -0
  17. package/src/iconSets.mjs +89 -0
  18. package/src/iconSlots.mjs +48 -0
  19. package/src/icons.mjs +285 -45
  20. package/src/iconsCli.mjs +76 -0
  21. package/src/layoutRoutes.mjs +92 -0
  22. package/src/layouts.mjs +4 -4
  23. package/src/mediaPreviews.mjs +3 -1
  24. package/src/narrate.mjs +31 -4
  25. package/src/opening.mjs +9 -3
  26. package/src/ops.mjs +49 -0
  27. package/src/photosGuide.mjs +47 -0
  28. package/src/picturesGuide.mjs +53 -0
  29. package/src/play.mjs +3 -2
  30. package/src/presenter.mjs +3 -1
  31. package/src/release.mjs +13 -5
  32. package/src/runtime.mjs +9 -2
  33. package/src/scaffold.mjs +73 -13
  34. package/src/source.mjs +86 -14
  35. package/src/stockMedia.mjs +299 -0
  36. package/src/themeCli.mjs +41 -0
  37. package/src/themes.mjs +345 -0
  38. package/templates/icons/material.LICENSE +202 -0
  39. package/templates/icons/material.json.gz +0 -0
  40. package/templates/icons/phosphor.LICENSE +21 -0
  41. package/templates/icons/phosphor.json.gz +0 -0
  42. package/templates/icons/tabler.LICENSE +21 -0
  43. package/templates/icons/tabler.json.gz +0 -0
  44. package/templates/layouts/_deck.html +177 -36
  45. package/templates/layouts/bento.html +75 -0
  46. package/templates/layouts/chart.html +6 -4
  47. package/templates/layouts/closer.html +10 -3
  48. package/templates/layouts/compare.html +13 -4
  49. package/templates/layouts/cover-band.html +10 -8
  50. package/templates/layouts/cover-frame.html +9 -7
  51. package/templates/layouts/cover-poster.html +8 -5
  52. package/templates/layouts/cover-split.html +7 -6
  53. package/templates/layouts/cover-type.html +1 -0
  54. package/templates/layouts/features.html +9 -7
  55. package/templates/layouts/funnel.html +60 -0
  56. package/templates/layouts/hero.html +40 -22
  57. package/templates/layouts/lanes.html +63 -0
  58. package/templates/layouts/loop.html +81 -0
  59. package/templates/layouts/number.html +2 -1
  60. package/templates/layouts/phone-stage.html +68 -0
  61. package/templates/layouts/phones.html +1 -0
  62. package/templates/layouts/picture-full.html +48 -0
  63. package/templates/layouts/portrait.html +45 -0
  64. package/templates/layouts/product.html +7 -6
  65. package/templates/layouts/quote.html +2 -1
  66. package/templates/layouts/rail.html +71 -0
  67. package/templates/layouts/scorecard.html +70 -0
  68. package/templates/layouts/screens.html +85 -0
  69. package/templates/layouts/sentence.html +39 -0
  70. package/templates/layouts/split.html +22 -7
  71. package/templates/layouts/spotlight.html +77 -0
  72. package/templates/layouts/stack.html +83 -0
  73. package/templates/layouts/staircase.html +76 -0
  74. package/templates/layouts/strike.html +46 -0
  75. package/templates/layouts/tap-through.html +73 -0
  76. package/templates/layouts/team.html +3 -2
  77. package/templates/layouts/timeline.html +16 -6
  78. package/templates/layouts/two-bars.html +53 -0
  79. package/templates/layouts/two-by-two.html +71 -0
  80. package/templates/layouts/video-beats.html +66 -0
  81. package/templates/layouts/video-full.html +62 -0
  82. package/templates/layouts/wall.html +81 -0
  83. package/templates/layouts/zoom.html +144 -0
  84. package/templates/narrated-deck.html +12 -7
  85. package/templates/script.md +2 -2
  86. /package/templates/icons/{LICENSE → lucide.LICENSE} +0 -0
package/src/narrate.mjs CHANGED
@@ -6,7 +6,8 @@
6
6
  // This polls the job, saves the manifest into <deck-dir>/narration/ and points the
7
7
  // player script's data-manifest in index.html at the new manifest URL.
8
8
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
9
- import { basename, join, resolve } from "node:path";
9
+ import { join, resolve } from "node:path";
10
+ import { deckSlug, slugNote } from "./deckSlug.mjs";
10
11
  import * as ops from "./ops.mjs";
11
12
  import { presenterLine } from "./presenter.mjs";
12
13
  import { writeDraftFace } from "./draftFace.mjs";
@@ -31,7 +32,7 @@ export function narrationRequest(pos, opts) {
31
32
  return {
32
33
  deckDir,
33
34
  fields: {
34
- slug: opts.slug || basename(deckDir),
35
+ slug: deckSlug(deckDir, opts),
35
36
  script: readFileSync(scriptPath, "utf8"),
36
37
  voice: opts.voice,
37
38
  slides: opts.slide !== undefined ? slideList(opts.slide) : undefined,
@@ -40,9 +41,35 @@ export function narrationRequest(pos, opts) {
40
41
  };
41
42
  }
42
43
 
44
+ // One narration job runs per account (convex/narration.ts). While another runs,
45
+ // wait for it and try again, for up to `busyWaitMs`; then stop with its name.
46
+ // Nothing is charged for a refused start, so the retry (or a rerun) is safe.
47
+ export const BUSY_WAIT_MS = 5 * 60 * 1000;
48
+ const BUSY_POLL_MS = 15 * 1000;
49
+ const busy = (e) => /already running/i.test(String(e?.data ?? e?.message ?? e));
50
+ const busyText = (e) => String(e?.data ?? e?.message ?? e).replace(/^.*?(a narration job is already running)/i, "$1").split(";")[0];
51
+ export async function startNarration(opts, fields, { log, sleep = (ms) => new Promise((ok) => setTimeout(ok, ms)), busyWaitMs = BUSY_WAIT_MS } = {}) {
52
+ let waited = 0;
53
+ for (;;) {
54
+ try {
55
+ return await ops.narrateDeck(opts, fields);
56
+ } catch (e) {
57
+ if (!busy(e)) throw e;
58
+ if (waited >= busyWaitMs) {
59
+ throw new Error(`${busyText(e)}; waited ${Math.round(waited / 60000)} min for it. One narration runs per account: when it finishes, run this again (it is safe: nothing was charged and cached slides stay cached)`);
60
+ }
61
+ if (!waited) log(`… ${busyText(e)}; waiting for it (up to ${Math.round(busyWaitMs / 60000)} min), then this one starts`);
62
+ await sleep(BUSY_POLL_MS);
63
+ waited += BUSY_POLL_MS;
64
+ }
65
+ }
66
+ }
67
+
43
68
  // writeFace false: leave the presenter as written (release narrates, then puts the face on the upload itself).
44
- export async function narrate(pos, opts = {}, { log = (line) => console.log(line), writeFace = true } = {}) {
69
+ export async function narrate(pos, opts = {}, { log = (line) => console.log(line), writeFace = true, sleep, busyWaitMs } = {}) {
45
70
  const { deckDir, fields } = narrationRequest(pos, opts);
71
+ const note = slugNote(deckDir, opts);
72
+ if (note) log(`narrating ${note}`);
46
73
  if (opts["dry-run"]) {
47
74
  const preview = await ops.previewNarration(opts, fields);
48
75
  if (preview.presenterStyle) log(`presenter style: ${preview.presenterStyle}`);
@@ -54,7 +81,7 @@ export async function narrate(pos, opts = {}, { log = (line) => console.log(line
54
81
  if (who) log(who);
55
82
  return preview;
56
83
  }
57
- const { jobId, slides, presenter, credits, creditsRemaining } = await ops.narrateDeck(opts, fields);
84
+ const { jobId, slides, presenter, credits, creditsRemaining } = await startNarration(opts, fields, { log, sleep, busyWaitMs });
58
85
  log(`narration job ${jobId}: ${slides.filter((s) => s.status === "render").length} to render, ${slides.filter((s) => s.status === "cached").length} cached`);
59
86
  if (credits > 0) log(`charged ${credits} credit${credits === 1 ? "" : "s"}${creditsRemaining != null ? `, credits left: ${creditsRemaining}` : ""}`);
60
87
  const who = presenterLine(presenter);
package/src/opening.mjs CHANGED
@@ -75,9 +75,13 @@ export const OPENING_CSS = `#hd-open{position:fixed;inset:0;z-index:2147483000;p
75
75
 
76
76
  // Runs the card `o` (#hd-open): shows it after FAST_MS unless the deck is
77
77
  // ready, follows data-hd-boot, and on data-hd-ready jumps, fades and removes
78
- // itself. In a frame, a thumbnail or an export it removes itself at once.
78
+ // itself. In a frame, a thumbnail or an export it removes itself at once. A
79
+ // deep link (#<n> past 1, or #scene=<id>, navigation.js sceneFromHash) opens
80
+ // on plain ground: the poster (its URL in data-src, so a deep link never
81
+ // fetches it) is the cover, not the slide being opened.
79
82
  export const OPENING_RUN = `function(o){var b=document.body,d=document.documentElement;if(!o||!b)return;
80
83
  if(self!==top||/[?&](thumb|export)\\b/.test(location.search)||d.hasAttribute("data-hyperdecks-thumb")){o.remove();return}
84
+ var pic=o.querySelector(".hdo-slide img");if(pic){if(/^#(scene=|(?!1$)\\d+$)/.test(location.hash||""))pic.remove();else pic.src=pic.getAttribute("data-src")}
81
85
  var S=${JSON.stringify(BOOT_STEPS)},bar=o.querySelector(".hdo-bar i"),step=o.querySelector(".hdo-step"),who=o.getAttribute("data-name")||"the presenter",at=0,shown=false,done=false,mo;
82
86
  var rm=window.matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches;
83
87
  function boot(){var s=S[b.getAttribute("data-hd-boot")];if(!s||s[0]<=at)return;at=s[0];bar.style.width=s[0]+"%";step.textContent=s[1].split("{name}").join(who)}
@@ -102,13 +106,15 @@ export const OPENING_BUDDY = `<div class="hdo-buddy"><div class="hdo-hop"><div c
102
106
  // unless a route already added a card, the player is ready, or the page is
103
107
  // framed, a thumbnail or an export, it puts a card at the top of <body> with
104
108
  // the page's <title> and the player tag's presenter still (none when it
105
- // presents nobody), with no poster and no narrator's name, and runs it.
109
+ // presents nobody, or for a silent deck the player shows with no presenter:
110
+ // player.js silentFaceless), with no poster and no narrator's name, and runs it.
106
111
  export const OPENING_PAGE_SCRIPT = `<script data-hd-opening>(function(){var d=document;
107
112
  if(self!==top||/[?&](thumb|export)\\b/.test(location.search))return;
108
113
  function go(){if(d.readyState==="loading")return;d.removeEventListener("readystatechange",go);
109
114
  var b=d.body,p=d.querySelector('script[src*="/player/v"][src*="/player.js"]');
110
115
  if(!b||!p||d.getElementById("hd-open")||b.hasAttribute("data-hd-ready")||d.documentElement.hasAttribute("data-hyperdecks-thumb"))return;
111
- var o=d.createElement("div"),img=p.getAttribute("data-presenter")!=="none"&&p.getAttribute("data-presenter-image");
116
+ var sv=p.getAttribute("data-silent"),mute=sv!==null&&!/^(false|0|no)$/i.test(sv)&&p.getAttribute("data-silent-presenter")==="hide"&&!p.getAttribute("data-manifest")&&!d.querySelector("section[data-clip]");
117
+ var o=d.createElement("div"),img=!mute&&p.getAttribute("data-presenter")!=="none"&&p.getAttribute("data-presenter-image");
112
118
  o.id="hd-open";o.setAttribute("aria-hidden","true");
113
119
  o.innerHTML='<div class="hdo-slide"></div><div class="hdo-card">'+(img?${JSON.stringify(OPENING_BUDDY)}:'')+'<div class="hdo-title"></div><div class="hdo-bar"><i></i></div><div class="hdo-step"></div></div>';
114
120
  if(img){var i=o.querySelector(".hdo-buddy img");i.addEventListener("error",function(){var y=o.querySelector(".hdo-buddy");if(y)y.remove()});i.src=img}
package/src/ops.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { fitSlot, parseSlotTarget, searchHint } from "./stockMedia.mjs";
1
2
  import { deckPlayer, importPlayerWarning, viewPlayerWarning } from "./deckPlayer.mjs";
2
3
  import { zipSync } from "fflate";
3
4
  import { SPECIES } from "./species.mjs";
@@ -228,6 +229,40 @@ export async function captureUrl(opts, fields = {}) {
228
229
  return (await client(opts)).action(api.screenshots.captureUrl, args);
229
230
  }
230
231
 
232
+ // Found pictures (convex/stockMedia.ts): Unsplash photos and GIPHY GIFs, free.
233
+ // Both are embedded from the service's own URL with a credit line (their terms);
234
+ // see stockMedia.mjs. Results carry the shape so a layout can be picked by it.
235
+ export async function searchPhotos(opts, fields = {}) {
236
+ if (!fields.query) throw new Error("query is required");
237
+ const args = { query: String(fields.query) };
238
+ if (fields.orientation) args.orientation = String(fields.orientation);
239
+ if (fields.limit != null && fields.limit !== "") args.limit = Number(fields.limit);
240
+ const out = await (await client(opts)).action(api.stockMedia.searchPhotos, args);
241
+ const hint = searchHint({ orientation: args.orientation, limit: args.limit, count: out.results.length });
242
+ return hint ? { ...out, hint } : out;
243
+ }
244
+
245
+ // Use one photo from searchPhotos: its slide URL, credit and markup; tells
246
+ // Unsplash it was used (their download tracking).
247
+ export async function addPhoto(opts, fields = {}) {
248
+ if (!fields.id) throw new Error("id is required (a photo id from search_photos)");
249
+ // `for`: a layout (or a slide id made from one) whose picture slot the markup
250
+ // is for; checked first, so a wrong name never counts as an Unsplash download.
251
+ if (fields.for) parseSlotTarget(fields.for);
252
+ const out = await (await client(opts)).action(api.stockMedia.addPhoto, { id: String(fields.id) });
253
+ return fields.for ? fitSlot(out, fields.for) : out;
254
+ }
255
+
256
+ export async function searchGifs(opts, fields = {}) {
257
+ if (!fields.query) throw new Error("query is required");
258
+ const args = { query: String(fields.query) };
259
+ if (fields.rating) args.rating = String(fields.rating).toLowerCase();
260
+ if (fields.limit != null && fields.limit !== "") args.limit = Number(fields.limit);
261
+ if (fields.for) parseSlotTarget(fields.for);
262
+ const out = await (await client(opts)).action(api.stockMedia.searchGifs, args);
263
+ return fields.for ? { ...out, results: out.results.map((r) => fitSlot(r, fields.for)) } : out;
264
+ }
265
+
231
266
  const CHART_FIELDS = ["kind", "title", "subtitle", "labels", "series", "values", "value", "label", "delta", "prefix", "suffix", "palette", "width", "height", "slug", "name"];
232
267
 
233
268
  // Render a chart spec (convex/charts.ts) to a branded SVG asset. Unknown keys are
@@ -630,6 +665,9 @@ export async function listShares(opts, slug) {
630
665
  allowForwardOverride: r.allowForwardOverride ?? null,
631
666
  // The link's own pace (auto, slide, step); null = it follows the deck.
632
667
  pace: r.pace ?? null,
668
+ // "play": an open counts (and alerts) only when the viewer presses play,
669
+ // for a deck embedded in a page; null = on open, the default.
670
+ countOn: r.countOn ?? null,
633
671
  parentToken: r.parentToken ?? null,
634
672
  forwardedBy: r.forwardedBy ?? null,
635
673
  probablyForwarded: !!r.probablyForwarded,
@@ -646,6 +684,8 @@ export async function createShare(opts, fields) {
646
684
  if (fields.note) args.note = fields.note;
647
685
  if (fields.requireEmail) args.requireEmail = true;
648
686
  if (fields.allowForward !== undefined) args.allowForward = !!fields.allowForward;
687
+ // Count an open only when the viewer presses play (an embedded deck).
688
+ if (fields.countOnPlay) args.countOn = "play";
649
689
  // The link's own pace; absent = it follows the deck's.
650
690
  if (fields.pace !== undefined) {
651
691
  if (!DECK_PACES.includes(fields.pace)) throw new Error(`pace must be auto, slide or step (got ${JSON.stringify(fields.pace)})`);
@@ -670,6 +710,15 @@ export async function setShareEnabled(opts, token, enabled) {
670
710
  return { token, enabled: !!enabled };
671
711
  }
672
712
 
713
+ // When a link counts an open: on play (true, for a deck embedded in a page)
714
+ // or on open (false, the default for a link sent to a person).
715
+ export async function setShareCountOn(opts, token, onPlay) {
716
+ if (!token) throw new Error("token is required");
717
+ const countOn = onPlay ? "play" : null;
718
+ await (await client(opts)).mutation(api.shares.setCountOn, { token, countOn });
719
+ return { token, countOn };
720
+ }
721
+
673
722
  export async function setShareNotify(opts, token, notify) {
674
723
  if (!token) throw new Error("token is required");
675
724
  await (await client(opts)).mutation(api.shares.setNotify, { token, notify });
@@ -0,0 +1,47 @@
1
+ // hyperdecks guide photos (deck_guide topic photos; also "gifs"): found photos
2
+ // (Unsplash) and GIFs (GIPHY). Written per surface: the CLI's names the
3
+ // commands and the words they print; the hosted MCP's names the tools and the
4
+ // fields they return.
5
+ import { PICTURE_SLOTS } from "./stockMedia.mjs";
6
+
7
+ const slotList = () => {
8
+ const by = (cls) => Object.entries(PICTURE_SLOTS).filter(([, s]) => s.cls === cls).map(([n]) => `\`${n}\``).join(", ");
9
+ return `${by("art")} (\`class="art"\`), ${by("pic")} (\`class="pic"\`) or ${by("shot")} (\`class="shot"\`)`;
10
+ };
11
+
12
+ export function photosGuide(surface) {
13
+ const cli = surface === "cli";
14
+ const ex = (tool, args, command) => (cli ? `\`\`\`\n${command}\n\`\`\`` : `\`\`\`\n${tool} { ${args} }\n\`\`\``);
15
+ const forName = cli ? "`--for`" : "`for`";
16
+ const replaces = cli ? "what it prints after \"in place of\"" : "what `slot.replaces` names";
17
+ const others = cli ? "what it prints under \"for each other … (no id)\"" : "`slot.otherCells.markup` (no id)";
18
+ const creditLine = cli ? "the line it prints under \"credit line\"" : "`creditLine`";
19
+ const join = cli ? "the two credits' text inside one `<p class=\"hd-credit\">`, joined with \" · \"" : "their `creditHtml` joined with \" · \" in one `<p class=\"hd-credit\">`";
20
+ const note = cli ? "the \"data-note credit:\" line" : "`note`";
21
+ const hint = cli ? "it prints a line saying so" : "the result says so in `hint`";
22
+ return [
23
+ "# Found photos and GIFs",
24
+ "",
25
+ "**When.** A found photo (Unsplash) is right for a real place, object or mood the person has no picture of: a harbour, a coffee bar, a trail. It is wrong for their product (capture it), a specific person (their own photo, with permission), their team or event, or a diagram or a number (draw it). A GIF (GIPHY) only in a casual deck or when asked: one or two a deck, on a slide of its own (a picture-full or a cover, the GIF as its picture), never beside a number, a quote or a product screenshot, nor for customers or investors unless asked.",
26
+ "",
27
+ "**1. Search** by shape for the slot: `cover-band`, `cover-frame`, `cover-poster`, `picture-full` and wide walls want landscape; `cover-split` wants square or near it; `portrait` wants portrait; `hero` takes 2:1 to 3:4.",
28
+ "",
29
+ ex("search_photos", 'query: "harbour at dawn", orientation: "landscape"', "hyperdecks photos search harbour at dawn --orientation landscape"),
30
+ "",
31
+ `Squarish comes back short (few photos are square; ${hint}): search landscape and let the slot crop it, subject near the middle.`,
32
+ "",
33
+ `**2. Add** the one you pick, naming the layout it goes in (${forName}):`,
34
+ "",
35
+ ex("add_photo", 'id: "Dwu85P9SOIk", for: "cover-band"', "hyperdecks photos add Dwu85P9SOIk --for cover-band"),
36
+ "",
37
+ `${forName} is one of ${slotList()}, or a slide id made from one (\`wall-2\`); when the slide's id is not the layout's name, give both (\`wall:proof\` for \`<section id="proof" class="slide l-wall">\`). The markup carries that slot's class and id (the layout's cues aim at it): paste it unedited in place of ${replaces}. A wall takes one add per photo: the first fills the large cell (id \`…-p1\`), the rest use ${others}. A caption: wrap it as \`<figure class="mount" data-caption="Where, when">…</figure>\`. Phone, product, zoom and video layouts take a screenshot or recording, not a found picture.`,
38
+ "",
39
+ `**3. A GIF**: the search returns the markup, so name the slot there:`,
40
+ "",
41
+ ex("search_gifs", 'query: "high five", for: "picture-full"', "hyperdecks gifs search high five --for picture-full"),
42
+ "",
43
+ `**The credit.** Each add or GIF comes with ${creditLine}, a \`<p class="hd-credit">\`: put it once on the same slide, as the slide's own child (straight inside the \`<section>\`, never inside the picture's slot, nor on a slide without the photo); it shows in the top-right corner and its links work before and after Play. Never edit it: the photographer's and Unsplash's links, or "Powered by GIPHY", are what the terms require, and check fails without them. Two found pictures on one slide share one line: ${join}. Put ${note} in the slide's \`data-note\`.`,
44
+ "",
45
+ "**Limits.** Searches and adds are free. Unsplash allows 50 requests an hour while Hyperdecks is in its demo mode (each search and each add counts), and Hyperdecks takes 20 a minute per service (searches and adds). GIFs are rated g unless the person asks for pg. Found pictures stay on Unsplash or GIPHY, so one can vanish after release: the player hides it, and check warns.",
46
+ ].join("\n");
47
+ }
@@ -0,0 +1,53 @@
1
+ // hyperdecks guide pictures (deck_guide topic pictures; also "icons"): which kind of picture fits which slide, each
2
+ // with the command (CLI) or tool (hosted MCP) that makes it, and how a layout's icon slot is filled. Short on purpose:
3
+ // the photos, look and layouts topics carry the detail. lib/deckIcons.test.ts holds every command and tool named here
4
+ // to the real ones.
5
+ import { THEME_ICON_PAIRINGS } from "./iconChoice.mjs";
6
+ import { ICON_SLOT_LAYOUTS } from "./iconSlots.mjs";
7
+
8
+ // What each kind is made with, per surface. `[cli, hosted]`.
9
+ export const PICTURE_MAKERS = {
10
+ icon: ["hyperdecks icons search <word> --for <layout>", "search_icons { query, for }"],
11
+ iconSet: ['hyperdecks icons <subject...> --preset line --slug <slug>', "generate_icon_set { subjects, preset }"],
12
+ screenshot: ["hyperdecks screenshot <url>", "capture_url { url }"],
13
+ upload: ["hyperdecks asset add <slug> <file>", "upload_deck_asset"],
14
+ photo: ["hyperdecks photos search <words>, then hyperdecks photos add <id> --for <layout>", "search_photos { query }, then add_photo { id, for }"],
15
+ gif: ["hyperdecks gifs search <words> --for picture-full", 'search_gifs { query, for: "picture-full" }'],
16
+ image: ['hyperdecks gen-image "<prompt>"', "generate_image { prompt }"],
17
+ chart: ["hyperdecks chart <spec.json>", "render_chart { kind }"],
18
+ };
19
+
20
+ export function picturesGuide(surface) {
21
+ const cli = surface === "cli";
22
+ const m = (kind) => `\`${PICTURE_MAKERS[kind][cli ? 0 : 1]}\``;
23
+ const topic = (t) => (cli ? `\`hyperdecks guide ${t}\`` : `\`deck_guide { topic: "${t}" }\``);
24
+ return [
25
+ "# Pictures: which kind for which slide",
26
+ "",
27
+ "Pick per slide, the most real thing first. A picture must show something real: never generic clip-art or decoration.",
28
+ "",
29
+ `- **A concept or a step** (a reason, a stage, a layer, a feature), if a symbol helps: an icon in the layout's icon slot, ${m("icon")}. Optional.`,
30
+ `- **The product**: a screenshot or a screen recording, ${m("screenshot")}, or one the person gives you, ${m("upload")}.`,
31
+ `- **A real place, thing or mood** with no picture of their own: a found photo, ${m("photo")} (${topic("photos")}).`,
32
+ `- **One light moment**, in a casual deck only: a GIF on a slide of its own, ${m("gif")}.`,
33
+ `- **Something real that has no picture** (a product not built yet, a scene that cannot be photographed): a generated image, ${m("image")}. Never as decoration or a stand-in for their product, team or event.`,
34
+ `- **Numbers**: a chart of the real data, ${m("chart")}.`,
35
+ "- **Leave it as words** when the words are the point: a quote, a one-line claim (sentence, strike), the ask on the closer.",
36
+ "",
37
+ "## Icons",
38
+ "",
39
+ `These layouts have an optional icon slot: ${ICON_SLOT_LAYOUTS.map((n) => `\`${n}\``).join(", ")}. Use an icon where it helps the reader find or remember an item; leave it out where the words carry it. A slide or a whole deck with no icons is fine. When a slide has icons, its items match (all with one, or none). Search with the layout named, and paste the svg it gives where it says, unedited; the theme sizes it and draws it (line weight, colour, bare or on a tile):`,
40
+ "",
41
+ "```",
42
+ cli ? "hyperdecks icons search growth --for staircase" : 'search_icons { query: "growth", for: "staircase" }',
43
+ "```",
44
+ "",
45
+ `Plain words work ("money", "safety", "grow", "team"); when nothing matches, ask for what the picture would show in a plainer word, or leave the icon out. **One icon style a deck**: one set and weight from this search (Lucide line, Phosphor in six weights, Tabler outline or fill, Material Symbols outline or fill; ${cli ? "`hyperdecks icons sets`" : "`icon_sets`"} shows them), set once with ${cli ? "`hyperdecks icons use <deck> <set> [weight]`" : "`use_icon_set { slug, set, weight }`"}, which records it and puts the layouts' own icons (features, split's sticker, the closer's arrow) in it, so later searches stay in it and check sees one set; when the set has no close match the answer shows the closest from the others; or one generated set (${m("iconSet")}, every subject in one call, each as \`<img class="icon">\`); never both. Check warns on a mix.`,
46
+ "",
47
+ `A start for each theme, a suggestion only (the subject may want another): ${Object.entries(THEME_ICON_PAIRINGS).map(([t, p]) => `${t} ${p}`).join(", ")}.`,
48
+ "",
49
+ "**Icons are not pictures.** The look topic's rule, a real picture on at least every other slide, counts screenshots, recordings, photos and charts only. When fewer than a third of a deck's slides (three or more) show one, check says so and names the slides that could take one, if it helps, and which kind (a photo, a screenshot, a chart). With a third or more it says nothing about pictures. Check never asks for an icon; it names a slide whose items have icons on some only.",
50
+ "",
51
+ `More: ${topic("look")} (textures, the icon set, a picture on every other slide), ${topic("layouts")} (each layout's slots).`,
52
+ ].join("\n");
53
+ }
package/src/play.mjs CHANGED
@@ -9,7 +9,8 @@ import { withAvatarView } from "./avatar-view.mjs";
9
9
  // Ctrl-C. The deck's script.md and evidence.md are not served (preview-capture.mjs
10
10
  // serves only the file types a page loads).
11
11
  import { readFileSync } from "node:fs";
12
- import { basename, join, relative } from "node:path";
12
+ import { join, relative } from "node:path";
13
+ import { deckSlug } from "./deckSlug.mjs";
13
14
  import { playerScript, sectionIds } from "./checkRules.mjs";
14
15
  import { resolveDeckDir } from "./check.mjs";
15
16
  import * as ops from "./ops.mjs";
@@ -84,7 +85,7 @@ export async function startPlay(pos, opts = {}, { log = (line) => console.log(li
84
85
  const port = portOf(opts.port);
85
86
  const deckDir = resolveDeckDir(deckDirArg, cwd);
86
87
  const path = pathFrom(cwd, deckDir);
87
- const slug = opts.slug || basename(deckDir);
88
+ const slug = deckSlug(deckDir, opts);
88
89
  const file = join(deckDir, "index.html");
89
90
  const html = readFileSync(file, "utf8");
90
91
 
package/src/presenter.mjs CHANGED
@@ -37,7 +37,9 @@ const value = (tag, name) => {
37
37
  // The face this tag shows, decided as packages/player/player.js does: data-presenter
38
38
  // head|static|none, else static when there is a still, else none. head draws
39
39
  // data-avatar (and falls back to the still without one); static draws the
40
- // still. Null: the deck plays the voice and captions with no face.
40
+ // still. Null: the deck plays the voice and captions with no face. A silent
41
+ // deck marked data-silent-presenter="hide" shows none whatever this says
42
+ // (player.js silentFaceless); release skips silent decks, so no caller sees one.
41
43
  function tagFace(tag) {
42
44
  const presenter = value(tag, "data-presenter");
43
45
  const avatarUrl = value(tag, "data-avatar") || null;
package/src/release.mjs CHANGED
@@ -23,6 +23,7 @@ import { checkDeck, deckFiles, deckFolder, deckPathResolver, resolveDeckDir } fr
23
23
  import { mediaRefs, withMediaPreviews } from "./mediaPreviews.mjs";
24
24
  import { bundledFfmpeg, HTTPS_TOO, makePreview } from "./mediaPreviewMake.mjs";
25
25
  import { narrate as runNarrate } from "./narrate.mjs";
26
+ import { slugNote } from "./deckSlug.mjs";
26
27
 
27
28
  const SLUG = /^[a-z0-9][a-z0-9-]{0,63}$/;
28
29
 
@@ -31,7 +32,10 @@ export function deckChanges(deckDir) {
31
32
  try {
32
33
  return execFileSync("git", ["-C", deckDir, "status", "--porcelain", "--untracked-files=all", "--", "."], { encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trimEnd();
33
34
  } catch (e) {
34
- throw new Error(`release needs the deck in a git repository, so a release corresponds to a commit (${String(e.stderr || e.message).trim()})`);
35
+ const why = String(e.stderr || e.message).trim();
36
+ // Outside any repository: say how to make one, so the next try goes through.
37
+ const fix = /not a git repository/i.test(why) ? `; to make one: cd "${deckDir}" && git init && git add -A && git commit -m "deck"` : "";
38
+ throw new Error(`release needs the deck in a git repository, so a release corresponds to a commit (${why})${fix}`);
35
39
  }
36
40
  }
37
41
 
@@ -144,6 +148,8 @@ export async function release(pos, opts = {}, io = {}) {
144
148
  const { log = (line) => console.log(line), changes = deckChanges, untracked = untrackedFiles, commit = deckCommit, narrate = runNarrate, previews = mediaPreviewsFor, fetch, cwd, measure, measureFit } = io;
145
149
  const deckDir = resolveDeckDir(pos[0], cwd);
146
150
  const to = recipients(opts);
151
+ const note = slugNote(deckDir, opts);
152
+ if (note) log(`releasing ${note}`);
147
153
 
148
154
  const dirty = changes(deckDir);
149
155
  if (dirty) throw new Error(`refusing to release: ${deckDir} has uncommitted changes\n${dirty}\ncommit them first so the release corresponds to a commit`);
@@ -215,7 +221,9 @@ async function publish({ opts, io: { log, commit }, deckDir, slug, to, checked,
215
221
 
216
222
  const base = await linkBase(opts);
217
223
  const shares = [];
218
- for (const r of to) {
224
+ // --qa with no --to: one QA link for your own check, with no email sent.
225
+ const qaOnly = !to.length && !!opts.qa;
226
+ for (const r of qaOnly ? [{ recipient: "Me" }] : to) {
219
227
  let token;
220
228
  try {
221
229
  ({ token } = await ops.createShare(opts, {
@@ -223,18 +231,18 @@ async function publish({ opts, io: { log, commit }, deckDir, slug, to, checked,
223
231
  recipient: r.recipient,
224
232
  email: r.email,
225
233
  qa: opts.qa || undefined,
226
- notify: opts["no-notify"] ? false : undefined,
234
+ notify: opts["no-notify"] || qaOnly ? false : undefined,
227
235
  }));
228
236
  } catch (e) {
229
237
  // The deck is already live and earlier links exist: say so, so a retry does not duplicate them.
230
238
  const made = shares.map((s) => ` ${s.recipient}: ${s.url}`).join("\n") || " (none)";
231
239
  throw new Error(`share for "${r.recipient}" failed: ${ops.errorText(e)}\nthe deck is imported (${imported.deckUrl}); links already created:\n${made}\n` +
232
- `create the rest with \`hyperdecks share new ${imported.slug} "<name>"\` rather than releasing again`);
240
+ (qaOnly ? `make your QA link with \`hyperdecks share new ${imported.slug} "Me" --qa --no-notify\` rather than releasing again` : `create the rest with \`hyperdecks share new ${imported.slug} "<name>"\` rather than releasing again`));
233
241
  }
234
242
  const share = { recipient: r.recipient, email: r.email, qa: !!opts.qa, url: `${base}/v/${token}` };
235
243
  shares.push(share);
236
244
  log(`✓ share for "${r.recipient}"${share.qa ? " (QA, untracked)" : ""} → ${share.url}`);
237
245
  }
238
- if (!shares.length) log(` no --to given: \`hyperdecks share new ${imported.slug} "Me" --qa\` makes a link for your own viewing`);
246
+ if (!shares.length && !qaOnly) log(` no --to given: \`hyperdecks share new ${imported.slug} "Me" --qa\` makes a link for your own viewing`);
239
247
  return { slug: imported.slug, deckDir, commit: sha, deckUrl: imported.deckUrl, totalDuration: checked.totalDuration, silent: !!checked.silent, presenter: summary, files: bundle.files, shares };
240
248
  }
package/src/runtime.mjs CHANGED
@@ -9,7 +9,7 @@ import { ConvexHttpClient } from "convex/browser";
9
9
  import { makeFunctionReference } from "convex/server";
10
10
  import { recordSkillInstall } from "./skillFreshness.mjs";
11
11
 
12
- export const VERSION = "0.9.23";
12
+ export const VERSION = "0.9.24";
13
13
 
14
14
  // Sent on the CLI's calls to our routes and to Convex, so the server can see
15
15
  // which CLI versions are still out there (not used to refuse anything).
@@ -144,6 +144,7 @@ export const api = {
144
144
  listForDeck: makeFunctionReference("shares:listForDeck"),
145
145
  remove: makeFunctionReference("shares:remove"),
146
146
  setAllowForward: makeFunctionReference("shares:setAllowForward"),
147
+ setCountOn: makeFunctionReference("shares:setCountOn"),
147
148
  setEnabled: makeFunctionReference("shares:setEnabled"),
148
149
  setNotify: makeFunctionReference("shares:setNotify"),
149
150
  linkOrigins: makeFunctionReference("shares:linkOrigins"),
@@ -153,6 +154,12 @@ export const api = {
153
154
  checkImageJob: makeFunctionReference("imagegen:checkImageJob"),
154
155
  generateIconSet: makeFunctionReference("imagegen:generateIconSet"),
155
156
  },
157
+ // Found pictures (convex/stockMedia.ts).
158
+ stockMedia: {
159
+ searchPhotos: makeFunctionReference("stockMedia:searchPhotos"),
160
+ addPhoto: makeFunctionReference("stockMedia:addPhoto"),
161
+ searchGifs: makeFunctionReference("stockMedia:searchGifs"),
162
+ },
156
163
  screenshots: {
157
164
  captureUrl: makeFunctionReference("screenshots:captureUrl"),
158
165
  },
@@ -214,7 +221,7 @@ export const api = {
214
221
  },
215
222
  };
216
223
 
217
- const BOOL = new Set(["private-only", "prod", "dev", "admin", "json", "require-email", "qa", "no-notify", "allow-forward", "no-forward", "help", "version", "all-agents", "global", "project", "transparent", "loop", "upload", "dry-run", "narrated", "layout", "strict", "fix", "full-page", "force", "hosted", "yes", "no-voice", "no-skill", "no-release", "no-narrate", "no-open", "save-to-minimoji", "captions-only", "no-brand", "brand", "no-logo", "pdf", "notes", "mp4", "gif", "video", "no-captions", "no-avatar", "title-card", "end-card", "backup"]);
224
+ const BOOL = new Set(["private-only", "prod", "dev", "admin", "json", "require-email", "qa", "no-notify", "allow-forward", "no-forward", "count-on-play", "help", "version", "all-agents", "global", "project", "transparent", "loop", "upload", "dry-run", "narrated", "layout", "strict", "fix", "full-page", "force", "hosted", "yes", "no-voice", "no-skill", "no-release", "no-narrate", "no-open", "save-to-minimoji", "captions-only", "no-brand", "brand", "no-logo", "pdf", "notes", "mp4", "gif", "video", "no-captions", "no-avatar", "title-card", "end-card", "backup", "trim"]);
218
225
  // release's recipients, in order: each --to starts one, and an --email right
219
226
  // after it belongs to it (`--to A --email a --to B`). Collected as opts.recipients;
220
227
  // opts.email stays the last --email for the other commands (share new).
package/src/scaffold.mjs CHANGED
@@ -7,19 +7,33 @@
7
7
  // render into it. The player tag gets the narrator's face (the account's default
8
8
  // narrator, else D.A.S.H.), so the file plays with a face however it is opened;
9
9
  // --captions-only writes data-presenter="none" on purpose instead.
10
- import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
11
- import { join, resolve } from "node:path";
10
+ import { existsSync, mkdirSync, readdirSync, statSync, readFileSync, rmSync, writeFileSync } from "node:fs";
11
+ import { join, relative, resolve } from "node:path";
12
12
  import * as ops from "./ops.mjs";
13
13
  import { PRESENTER_STYLES } from "./checkRules.mjs";
14
14
  import { LAYOUTS, NARRATED_FILES, assembleLayoutDeck, fillTemplate, parseLayouts } from "./layouts.mjs";
15
- import { applyBrand, brandForNewDeck, brandSummary } from "./brand.mjs";
15
+ import { applyBrand, brandAsked, brandForNewDeck, brandSummary, brandWanted } from "./brand.mjs";
16
+ import { DEFAULT_THEME, applyTheme, themeOrThrow, themeScript } from "./themes.mjs";
16
17
  import { writeDraftFace } from "./draftFace.mjs";
17
18
  import { DASH_PRESENTER, writeNarratorFace } from "./presenter.mjs";
19
+ import { recordSlug } from "./deckSlug.mjs";
20
+ import { sectionIds } from "./checkRules.mjs";
18
21
 
19
22
  export { LAYOUTS, NARRATED_FILES, assembleLayoutDeck, fillTemplate, parseLayouts, readLayout } from "./layouts.mjs";
20
23
 
21
24
  const SLUG = /^[a-z0-9][a-z0-9-]{0,63}$/;
22
- const USAGE = 'usage: deck new <slug> "<title>" --narrated [--layouts hero,product,number,closer] [--presenter-style <stage|bubble|glass|corner>] [--captions-only] [--no-brand] [--dir <path>]';
25
+ // The one line deck new prints for a deck that will not be narrated.
26
+ export const SILENT_ROUTE = "silent instead (no narration, no presenter): add data-silent to the player script in index.html, remove the cover's data-intro (\"Press play\"), skip narrate, then check and release";
27
+ const USAGE = 'usage: deck new <slug> "<title>" --narrated [--layouts hero,product,number,closer] [--presenter-style <stage|bubble|glass|corner>] [--presenter <narrator>] [--captions-only] [--theme <name>] [--brand|--no-brand] [--dir <path>]';
28
+
29
+ // The template's table rows and proposals swapped for this deck's own slides:
30
+ // one row a content slide (not the first or last), and the last slide proposed.
31
+ export function evidenceFor(text, ids) {
32
+ const content = ids.length > 2 ? ids.slice(1, -1) : ids;
33
+ return text
34
+ .replace(/(\|---\|---\|---\|---\|\n)(?:\| [^\n]*\n)+/, (_, head) => head + content.map((id) => `| ${id} | | | |\n`).join(""))
35
+ .replace(/(Proposed \(not yet agreed\)[^\n]*\n\n)(?:- [^\n]*\n?)+/, (_, head) => `${head}- ${ids.at(-1) ?? "(slide id)"}\n`);
36
+ }
23
37
 
24
38
  export async function deckNew(pos, opts = {}, { log = (line) => console.log(line), cwd = process.cwd() } = {}) {
25
39
  const [slug, title] = pos;
@@ -31,23 +45,55 @@ export async function deckNew(pos, opts = {}, { log = (line) => console.log(line
31
45
  }
32
46
  if (!SLUG.test(slug)) throw new Error("slug must be lowercase letters, digits and dashes (max 64)");
33
47
  const dir = resolve(/*turbopackIgnore: true*/ cwd, typeof opts.dir === "string" ? opts.dir : join("decks", slug));
34
- if (existsSync(dir)) throw new Error(`${dir} already exists; pick another slug or --dir`);
48
+ // An empty folder is fine (made for the deck); one with files in it is someone's.
49
+ const existed = existsSync(dir);
50
+ if (existed && !statSync(dir).isDirectory()) throw new Error(`${dir} is a file, not a folder; pick another --dir`);
51
+ if (existed && readdirSync(dir).length) throw new Error(`${dir} already exists and is not empty; pick another slug or --dir`);
52
+ const presenterRef = opts.presenter ?? opts.narrator;
53
+ if (presenterRef !== undefined && (typeof presenterRef !== "string" || !presenterRef.trim())) throw new Error("--presenter needs a narrator name, e.g. --presenter dash");
54
+ if (presenterRef !== undefined && opts["captions-only"]) throw new Error("--presenter and --captions-only disagree: pick one");
55
+ // A misspelt narrator fails here, before anything is registered.
56
+ const narrator = presenterRef !== undefined ? await ops.findNarrator(opts, presenterRef.trim()) : null;
35
57
  if (opts.layouts === true) throw new Error(`--layouts needs a list, e.g. --layouts hero,product,number,closer`);
36
58
  if (opts.layouts !== undefined) parseLayouts(opts.layouts);
37
- // The account's brand goes on the template (--no-brand: the template's look);
38
- // an explicit --presenter-style wins over the brand's.
39
- const { brand, readError } = await brandForNewDeck(() => ops.getBrand(opts), !(opts["no-brand"] || opts.brand === false));
59
+ // A misspelt theme fails here too. None means House, written out and named on <html data-hd-theme>
60
+ // like any other theme, so the player's page follows the slide (House's tokens are the template's own).
61
+ if (opts.theme === true) throw new Error("--theme needs a name: hyperdecks theme list");
62
+ const named = opts.theme !== undefined;
63
+ const theme = named ? themeOrThrow(opts.theme).id : DEFAULT_THEME;
64
+ // The account's brand goes on the template when no theme is named; a named
65
+ // theme keeps its own colours unless --brand (--no-brand: never). An
66
+ // explicit --presenter-style wins over the brand's.
67
+ const wanted = brandWanted(brandAsked(opts), named);
68
+ const { brand, readError } = await brandForNewDeck(() => ops.getBrand(opts), wanted);
40
69
  const style = presenterStyle ?? (PRESENTER_STYLES.includes(brand?.presenterStyle) ? brand.presenterStyle : undefined);
41
70
  const files = (opts.layouts !== undefined
42
71
  ? Object.entries(assembleLayoutDeck({ slug, title, presenterStyle: style, layouts: opts.layouts }))
43
72
  : Object.entries(NARRATED_FILES).map(([out, file]) => [out, fillTemplate(file, { slug, title, presenterStyle: style })]))
44
- .map(([out, text]) => [out, out === "index.html" ? applyBrand(text, brand) : text]);
73
+ .map(([out, text]) => [out, out === "index.html" ? applyBrand(applyTheme(text, theme), brand) : out === "script.md" ? themeScript(text, theme) : text]);
74
+ // evidence.md names this deck's slides (not the outline's), and script.md's
75
+ // commands name the folder the deck is really in.
76
+ const ids = sectionIds(files.find(([out]) => out === "index.html")[1]);
77
+ const where = relative(cwd, dir) || ".";
78
+ for (const f of files) {
79
+ if (f[0] === "evidence.md") f[1] = evidenceFor(f[1], ids);
80
+ if (f[0] === "script.md") f[1] = f[1].split(`decks/${slug}`).join(/\s/.test(where) ? JSON.stringify(where) : where);
81
+ }
45
82
  await ops.createDeck(opts, { slug, title });
46
83
  try {
47
84
  mkdirSync(dir, { recursive: true });
48
85
  for (const [out, text] of files) writeFileSync(join(/*turbopackIgnore: true*/ dir, out), text);
86
+ // The slug goes in the folder, so narrate, check and release find the deck whatever the folder is called.
87
+ recordSlug(dir, slug);
49
88
  } catch (e) {
50
- rmSync(dir, { recursive: true, force: true });
89
+ let cleanup = "";
90
+ try {
91
+ if (existed) for (const out of [...files.map(([f]) => f), ".hyperdecks.json"]) rmSync(join(/*turbopackIgnore: true*/ dir, out), { force: true });
92
+ else rmSync(dir, { recursive: true, force: true });
93
+ } catch (r) {
94
+ cleanup = `; ${dir} could not be cleaned up (${r.message})`;
95
+ }
96
+ e.message += cleanup;
51
97
  throw new Error(`deck ${slug} is registered but its files could not be written (${e.message}); remove the empty draft with \`hyperdecks deck rm ${slug} --yes\` and run deck new again`);
52
98
  }
53
99
  // The face goes into the file now the deck is registered (the server answers whose).
@@ -65,9 +111,23 @@ export async function deckNew(pos, opts = {}, { log = (line) => console.log(line
65
111
  }
66
112
  presenter = { face: null };
67
113
  } else {
114
+ // --presenter: this deck's narrator (its face and its voice), set before the face is written.
115
+ if (narrator) {
116
+ try {
117
+ await ops.setDeckNarrator(opts, slug, narrator.id);
118
+ } catch (e) {
119
+ lines.push(`⚠ presenter: could not set ${presenterRef} on the deck (${ops.errorText(e)}); the account default presents. Run \`hyperdecks deck narrator ${slug} ${presenterRef.trim()}\``);
120
+ }
121
+ }
68
122
  presenter = await writeDraftFace(opts, slug, htmlPath, { log: (line) => lines.push(line), fallback: DASH_PRESENTER });
123
+ if (presenterRef === undefined) lines.push(` (the account's default narrator; \`--presenter dash\` on deck new, or \`hyperdecks deck narrator ${slug} <name>\`, picks another)`);
69
124
  }
70
- const summary = brandSummary(brand, readError);
71
- log(`✓ created deck "${slug}" → ${dir}\n files: ${Object.keys(NARRATED_FILES).join(", ")}\n brand: ${summary.error ? `could not read it (${summary.error}); template look` : summary.applied.length ? summary.applied.join(", ") : "none applied (hyperdecks brand set)"}\n${lines.map((l) => (l.startsWith(" ") ? l : ` ${l}`)).join("\n")}\n next: hyperdecks narrate ${dir} --dry-run`);
72
- return { slug, title, dir, files: Object.keys(NARRATED_FILES), brand: summary, presenter: presenter.face ?? null };
125
+ const summary = brandSummary(brand, readError, { theme: named ? theme : undefined, wanted });
126
+ const brandLine = summary.themeOwn
127
+ ? `not applied: ${theme}'s own colours (pass --brand to recolour it in your brand)`
128
+ : summary.error ? `could not read it (${summary.error}); the theme's own colours`
129
+ : summary.applied.length ? `${summary.applied.join(", ")}${named ? ` on top of ${theme} (leave out --brand for its own colours)` : ""}`
130
+ : wanted ? "none applied (hyperdecks brand set)" : "not applied (--no-brand)";
131
+ log(`✓ created deck "${slug}" → ${dir}\n files: ${Object.keys(NARRATED_FILES).join(", ")}\n theme: ${named ? theme : `${theme} (the default)`}; change it with \`hyperdecks theme set ${dir} <name>\` (hyperdecks theme list)\n brand: ${brandLine}\n${lines.map((l) => (l.startsWith(" ") ? l : ` ${l}`)).join("\n")}\n next: hyperdecks narrate ${dir} --dry-run (the slug is recorded in ${dir}/.hyperdecks.json: no --slug needed)\n ${SILENT_ROUTE}`);
132
+ return { slug, title, dir, files: Object.keys(NARRATED_FILES), theme, brand: summary, presenter: presenter.face ?? null };
73
133
  }