@beff/aula-cli 0.8.1 → 0.8.2

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 (37) hide show
  1. package/README.md +1 -1
  2. package/dist/src/aula-render.core.wasm +0 -0
  3. package/dist/src/{aula-version-6SX7JIS4.js → aula-version-2DF4P4QU.js} +2 -2
  4. package/dist/src/{chunk-Q5GA52JZ.js → chunk-AKBT72QJ.js} +4 -4
  5. package/dist/src/{chunk-L75GJLCT.js → chunk-EDTZIVO7.js} +141 -44
  6. package/dist/src/{chunk-S7DEFSFH.js → chunk-KND7IF3K.js} +31 -7
  7. package/dist/src/cli.js +9 -9
  8. package/dist/src/{commands-C3ER3SKG.js → commands-BPEGSWPJ.js} +3 -3
  9. package/dist/src/{problems-ZPV2ADYA.js → problems-Q4WAM4GF.js} +2 -2
  10. package/dist/src/{run-RSLSQESN.js → run-3Q4HQSAQ.js} +8 -7
  11. package/dist/src/{server-X6EO4JBG.js → server-3ODXWDEU.js} +1 -1
  12. package/dist/src/{site-BEDOC3S3.js → site-2PE6SEQF.js} +2 -2
  13. package/dist/web/app/assets/__vite-browser-external-CUgZ0mbF.js +1 -0
  14. package/dist/web/app/assets/{aula-voice-worker-D4icQuwz.js → aula-voice-worker-D-T3qZPJ.js} +1 -1
  15. package/dist/web/app/assets/{aula.core5-C0zBQXNI.wasm → aula.core5-C-gePbHx.wasm} +0 -0
  16. package/dist/web/app/assets/{109a9620 → deb0a1c1}/aula-method.js +1 -1
  17. package/dist/web/app/assets/{109a9620 → deb0a1c1}/aula.js +1 -1
  18. package/dist/web/app/assets/{109a9620 → deb0a1c1}/build-worker.js +1 -1
  19. package/dist/web/app/assets/{109a9620 → deb0a1c1}/index.js +4 -6
  20. package/dist/web/app/assets/{index-CFRTa3wf.css → index-BL7_U8KF.css} +1 -1
  21. package/dist/web/app/assets/{protocol-pL5IbzcH.js → protocol-Rrh_NCGw.js} +1 -1
  22. package/dist/web/app/assets/{src-D0RJvTRf.js → src-BzXPjcyo.js} +1 -1
  23. package/dist/web/app/index.html +4 -4
  24. package/dist/web/site/assets/{998041da → 142f9973}/aula-method.js +1 -1
  25. package/dist/web/site/assets/{998041da → 142f9973}/aula.js +1 -1
  26. package/dist/web/site/assets/{998041da → 142f9973}/build-worker.js +1 -1
  27. package/dist/web/site/assets/{998041da → 142f9973}/index.js +4 -6
  28. package/dist/web/site/assets/__vite-browser-external-BaJPhbOR.js +1 -0
  29. package/dist/web/site/assets/{aula-voice-worker-Bj0Mmsvl.js → aula-voice-worker-DzsDUtvQ.js} +1 -1
  30. package/dist/web/site/assets/{aula.core5-C0zBQXNI.wasm → aula.core5-C-gePbHx.wasm} +0 -0
  31. package/dist/web/site/assets/{index-CFRTa3wf.css → index-BL7_U8KF.css} +1 -1
  32. package/dist/web/site/assets/{protocol-DBH1B1P4.js → protocol-CLpTIPIb.js} +1 -1
  33. package/dist/web/site/assets/{src-Whxqf0pR.js → src-FOaCgbcX.js} +1 -1
  34. package/dist/web/site/index.html +4 -4
  35. package/package.json +2 -2
  36. package/dist/web/app/assets/__vite-browser-external-LEfvJ-Ei.js +0 -1
  37. package/dist/web/site/assets/__vite-browser-external-CKQepNrH.js +0 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@ The `aula` command of [aula](https://github.com/lucasavila00/aula): it runs chap
4
4
 
5
5
  It needs Node 24. Narration (aula-voice) needs only Node. `aula export` needs ffmpeg. Refer to [CLI](https://github.com/lucasavila00/aula/blob/main/docs/agents/cli.md) for the commands and [Getting started](https://github.com/lucasavila00/aula/blob/main/docs/agents/getting-started.md) for the setup.
6
6
 
7
- The package has no model file. The first command that narrates or times a video (`preview`, `timeline`, `export`, `aula web`) downloads the narrator's model into `~/.cache/aula/models/aula-voice/`: the raw model of aula-voice's release [v0.2.1](https://github.com/lucasavila00/aula-voice/releases/tag/v0.2.1) (`model.f16-text-fp32.safetensors` and `config.json`, approximately 21 MB). The CLI checks the SHA-256 of each file, makes the engine's weight file (`aula-voice.avw`) from them, and checks its SHA-256 too. `aula web` narrates in the browser: it serves that file to its page from the same folder. The [model card](https://github.com/lucasavila00/aula-voice/releases/download/v0.2.1/MODEL_CARD.md) has the license of the model, its sources and its training data, and their attribution.
7
+ The package has no model file. The first command that narrates or times a video (`preview`, `timeline`, `export`, `aula web`) downloads the narrator's model into `~/.cache/aula/models/aula-voice/`: the raw model of aula-voice's release [v0.2.2](https://github.com/lucasavila00/aula-voice/releases/tag/v0.2.2) (`model.f16-text-fp32.safetensors` and `config.json`, approximately 21 MB). The CLI checks the SHA-256 of each file, makes the engine's weight file (`aula-voice.avw`) from them, and checks its SHA-256 too. `aula web` narrates in the browser: it serves that file to its page from the same folder. The [model card](https://github.com/lucasavila00/aula-voice/releases/download/v0.2.2/MODEL_CARD.md) has the license of the model, its sources and its training data, and their attribution.
8
8
 
9
9
  ## Licenses
10
10
 
Binary file
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  requireMatchingAulaVersion
3
- } from "./chunk-L75GJLCT.js";
3
+ } from "./chunk-EDTZIVO7.js";
4
4
  import "./chunk-S74JLCZK.js";
5
- import "./chunk-Q5GA52JZ.js";
5
+ import "./chunk-AKBT72QJ.js";
6
6
  import {
7
7
  Parsers,
8
8
  wrongArgument
@@ -283,24 +283,24 @@ var KOKORO_VOCAB = /* @__PURE__ */ new Map([
283
283
  ]);
284
284
 
285
285
  // ../aula-narration/src/aula-voice.ts
286
- var AULA_VOICE_RELEASE = "v0.2.1";
286
+ var AULA_VOICE_RELEASE = "v0.2.2";
287
287
  var RELEASE_URL = `https://github.com/lucasavila00/aula-voice/releases/download/${AULA_VOICE_RELEASE}`;
288
288
  var AULA_VOICE_FILES = {
289
289
  model: {
290
290
  path: "model.f16-text-fp32.safetensors",
291
291
  bytes: 21484448,
292
- sha256: "caca7b00f547d3feea506ccd6c534a764d0da2574bd850dd741fa80dd968dc52"
292
+ sha256: "2a53c01a91817f4d22211f37209ebdb4c46a7baf8458d21c85555c73825f6711"
293
293
  },
294
294
  config: {
295
295
  path: "config.json",
296
296
  bytes: 2215,
297
- sha256: "fa0a24abed935cf566d0efd17366af2bd98054b16caf9ccbcb8242e4991bacdc"
297
+ sha256: "6b12bb11248f3fe3acdfe9a940ace7c45892c3b69d93ea19f5c01e9c7b07a334"
298
298
  }
299
299
  };
300
300
  var AULA_VOICE_WEIGHTS = {
301
301
  path: "aula-voice.avw",
302
302
  bytes: 21474688,
303
- sha256: "98f886dafba9abfb98bbe1c1143ee026d08e579c7926c88501535c543f92212b"
303
+ sha256: "c895eeb4c322b337ee3f82552bf159347579fbb5fbe5349228e5c67e83dae581"
304
304
  };
305
305
  var SERVER_WEIGHTS_PATH = `/models/${AULA_VOICE_WEIGHTS.path}`;
306
306
  var aulaVoiceUrl = (file) => `${RELEASE_URL}/${file.path}`;
@@ -19,25 +19,19 @@ function requireMatchingAulaVersion(cli, project) {
19
19
  );
20
20
  }
21
21
 
22
+ // ../aula-project/src/check.ts
23
+ import { checkChapter, checkLexicon, checkTitle, readChapter as readChapter2 } from "@beff/aula";
24
+ import { chapterNames } from "@beff/aula/run";
25
+ import { check as rules, phonemize } from "@beff/aula/text";
26
+
22
27
  // ../aula-project/src/chapters.ts
23
28
  import { readChapter } from "@beff/aula";
24
- import { paragraphAt, scriptMarkdown } from "@beff/aula/text";
29
+ import { paragraphAt } from "@beff/aula/text";
25
30
  function chapterIndex(names, name) {
26
31
  const at = names.indexOf(name);
27
32
  if (at >= 0) return at;
28
33
  throw wrongArgument(`No chapter '${name}': use one of [${names.join(", ")}]`);
29
34
  }
30
- function header(project) {
31
- const body = project.storyboard.trim();
32
- return body === "" ? `# ${project.title}
33
- ` : `# ${project.title}
34
-
35
- ${body}
36
- `;
37
- }
38
- function placeText(place) {
39
- return `${place.file}:${String(place.line)}`;
40
- }
41
35
  function chapterText(project, host, index) {
42
36
  const result = readChapter(project, index, { host });
43
37
  if (!result.ok || !result.value) throw new Problems(result.diagnostics);
@@ -50,15 +44,6 @@ function paragraphCue(text, name, line) {
50
44
  const list = starts.length > 1 ? `${starts.slice(0, -1).join(", ")} and ${starts.at(-1) ?? ""}` : starts.join("");
51
45
  throw wrongArgument(`line ${String(line)} of ${name} is in no paragraph; the paragraphs start at lines ${list}`);
52
46
  }
53
- function texts(project, host) {
54
- const reads = project.chapters.map((_, i) => readChapter(project, i + 1, { host }));
55
- const problems = reads.flatMap((r) => r.ok && r.value ? [] : r.diagnostics);
56
- if (problems.length) throw new Problems(problems);
57
- return reads.flatMap((r) => r.value ? [r.value] : []);
58
- }
59
- function scriptView(project, host) {
60
- return scriptMarkdown(project.title, texts(project, host));
61
- }
62
47
  function openMoves(text) {
63
48
  return text.paragraphs.flatMap((p) => p.moves).filter((m2) => !m2.done);
64
49
  }
@@ -67,9 +52,6 @@ function openCount(chapters, indexes) {
67
52
  }
68
53
 
69
54
  // ../aula-project/src/check.ts
70
- import { checkChapter, checkLexicon, checkTitle, readChapter as readChapter2 } from "@beff/aula";
71
- import { chapterNames } from "@beff/aula/run";
72
- import { check as rules, phonemize } from "@beff/aula/text";
73
55
  var hasSpokenSound = (spoken) => Array.from(phonemize(spoken)).some((c) => new RegExp("\\p{L}", "u").test(c) && c !== "\u02C8" && c !== "\u02CC");
74
56
  function cueLocation(place) {
75
57
  if (place === void 0) return void 0;
@@ -318,21 +300,71 @@ function pictureGroups(window, stills) {
318
300
  { folder: "motion", cols: 4, rows: 4, tiles: motion }
319
301
  ];
320
302
  }
321
- function movesMarkdown(stills) {
322
- return stills.map((still) => {
323
- const at = still.place ? placeText(still.place) : "title card";
324
- const clip = still.embed === void 0 ? "" : ` (${still.embed.path}, ${still.embed.length})`;
325
- return `- ${at}, ${(still.frame / FPS3).toFixed(1)} s: ${still.note}${clip} (stills/${still.name}.png)
326
- `;
327
- }).join("");
328
- }
329
303
 
330
- // ../aula-project/src/timeline.ts
304
+ // ../aula-project/src/rows.ts
331
305
  import { readChapter as readChapter3, renderChapter } from "@beff/aula";
332
- import { chapterNames as chapterNames3 } from "@beff/aula/run";
333
- import { narrationScript, timeline as timelineOf } from "@beff/aula/text";
306
+ import { chapterNames as chapterNames3, FPS as FPS4 } from "@beff/aula/run";
307
+ import {
308
+ narrationScript,
309
+ timeline as timelineOf,
310
+ words
311
+ } from "@beff/aula/text";
312
+ var EMBED_TAIL = 15;
334
313
  var EMPTY2 = { heading: "", headingSpoken: "", metaphor: "", paragraphs: [] };
335
- async function timelineView(project, host, narrator, only) {
314
+ function frameAt(sample, rate, fps) {
315
+ const x = sample / rate * fps;
316
+ const floored = Math.floor(x);
317
+ const frac = x - floored;
318
+ if (frac < 0.5) return floored;
319
+ if (frac > 0.5) return floored + 1;
320
+ return floored % 2 === 0 ? floored : floored + 1;
321
+ }
322
+ function sampleAt(cue, word) {
323
+ if (cue.words.length > 0) return cue.words[word]?.startFrame ?? cue.endFrame;
324
+ const n = Math.max(words(cue.text).length, 1);
325
+ const t = Math.min(word, n) / n;
326
+ return cue.speechStartFrame + t * (cue.endFrame - cue.speechStartFrame);
327
+ }
328
+ function secondsAt(narration, sample) {
329
+ return frameAt(sample, narration.sampleRate, FPS4) / FPS4;
330
+ }
331
+ function scriptBeats(narration, text) {
332
+ const beats = [];
333
+ for (let n = 0; n < text.paragraphs.length; n++) {
334
+ const p = text.paragraphs[n];
335
+ const cue = narration.cues[n + 1];
336
+ if (p === void 0 || cue === void 0) break;
337
+ const firstWord = (index) => p.says.slice(0, index).reduce((sum, say) => sum + words(say.text).length, 0);
338
+ for (let k = 0; k < p.says.length; k++) {
339
+ const say = p.says[k];
340
+ if (say === void 0) continue;
341
+ const onScreen = p.moves.filter((m2) => m2.say === k).map((m2) => m2.note);
342
+ beats.push({
343
+ seconds: secondsAt(narration, sampleAt(cue, firstWord(k))),
344
+ kind: "say",
345
+ text: say.text,
346
+ onScreen
347
+ });
348
+ for (const e of p.embeds.filter((embed) => embed.say === k)) {
349
+ const start = secondsAt(narration, sampleAt(cue, firstWord(k + 1))) - (e.frames + EMBED_TAIL) / FPS4;
350
+ beats.push({ seconds: start, kind: "embed", text: e.note, onScreen: [] });
351
+ }
352
+ }
353
+ }
354
+ return beats;
355
+ }
356
+ function timedChapter(index, name, text, narration) {
357
+ return {
358
+ index,
359
+ name,
360
+ heading: text.heading,
361
+ metaphor: text.metaphor,
362
+ seconds: narration.endFrame / narration.sampleRate,
363
+ fullLines: timelineOf(narration, text),
364
+ beats: scriptBeats(narration, text)
365
+ };
366
+ }
367
+ async function loadTimed(project, host, narrator, only) {
336
368
  const names = chapterNames3(project);
337
369
  const indexes = only.length === 0 ? project.chapters.map((_, i) => i + 1) : only.map((name) => chapterIndex(names, name));
338
370
  if (indexes.includes(0)) throw wrongArgument("the title card has no timeline: give a chapter name");
@@ -343,20 +375,84 @@ async function timelineView(project, host, narrator, only) {
343
375
  return loaded.get(index) ?? readChapter3(project, index, { host }).value ?? EMPTY2;
344
376
  });
345
377
  const n = await clock(narrator, narrationScript(project, all), indexes, names);
346
- let out = header(project);
378
+ const chapters = [];
347
379
  for (const index of indexes) {
348
380
  const text = loaded.get(index) ?? chapterText(project, host, index);
349
381
  const run = renderChapter(project, index, { host, narration: narrationAt(n, index), lint: true });
350
382
  if (!run.ok || run.value === void 0) throw new Problems(run.diagnostics);
351
- out += `
352
- ## ${names[index] ?? ""}
353
- Metaphor: ${text.metaphor}
383
+ chapters.push(timedChapter(index, names[index] ?? "", text, run.value.narration));
384
+ }
385
+ return { title: project.title, storyboard: project.storyboard, chapters };
386
+ }
387
+ function formatFullChapter(chapter) {
388
+ let out = `## ${chapter.name}
389
+ Metaphor: ${chapter.metaphor}
354
390
  `;
355
- for (const line of timelineOf(run.value.narration, text)) out += `${line}
391
+ for (const line of chapter.fullLines) out += `${line}
356
392
  `;
357
- }
358
393
  return out;
359
394
  }
395
+ function movesMarkdown(chapter) {
396
+ return formatFullChapter(chapter);
397
+ }
398
+ function storyboardHeader(title, storyboard) {
399
+ const body = storyboard.trim();
400
+ return body === "" ? `# ${title}
401
+ ` : `# ${title}
402
+
403
+ ${body}
404
+ `;
405
+ }
406
+ function formatTimeline(project) {
407
+ let out = storyboardHeader(project.title, project.storyboard);
408
+ for (const chapter of project.chapters) out += `
409
+ ${formatFullChapter(chapter)}`;
410
+ return out;
411
+ }
412
+ function chapterLabel(name, heading) {
413
+ const prefix = /^(\d+)/.exec(name)?.[1];
414
+ return prefix === void 0 ? heading : `${prefix} ${heading}`;
415
+ }
416
+ function formatClock(seconds) {
417
+ const total = Math.max(0, Math.floor(seconds + 1e-9));
418
+ const m2 = Math.floor(total / 60);
419
+ const s = total % 60;
420
+ return `${String(m2)}:${String(s).padStart(2, "0")}`;
421
+ }
422
+ function formatDuration(seconds) {
423
+ if (seconds < 60) return `${seconds.toFixed(1)} s`;
424
+ const whole = Math.round(seconds);
425
+ const m2 = Math.floor(whole / 60);
426
+ const s = whole % 60;
427
+ return `${String(m2)} min ${String(s)} s`;
428
+ }
429
+ function formatScript(project) {
430
+ const total = project.chapters.reduce((sum, c) => sum + c.seconds, 0);
431
+ const lines = [`Video: ${project.title} (${formatDuration(total)})`, ""];
432
+ for (const chapter of project.chapters) {
433
+ lines.push(`${chapterLabel(chapter.name, chapter.heading)} (${chapter.seconds.toFixed(1)} s)`);
434
+ for (const beat of chapter.beats) {
435
+ const at = formatClock(beat.seconds);
436
+ if (beat.kind === "say") {
437
+ lines.push(` ${at} "${beat.text}"`);
438
+ if (beat.onScreen.length > 0) lines.push(` On screen: ${beat.onScreen.join("; ")}`);
439
+ } else {
440
+ lines.push(` ${at} embed: ${beat.text}`);
441
+ }
442
+ }
443
+ lines.push("");
444
+ }
445
+ return `${lines.join("\n").replace(/\n+$/, "")}
446
+ `;
447
+ }
448
+
449
+ // ../aula-project/src/timeline.ts
450
+ async function timelineView(project, host, narrator, only) {
451
+ return formatTimeline(await loadTimed(project, host, narrator, only));
452
+ }
453
+ async function scriptView(project, host, narrator, only) {
454
+ return formatScript(await loadTimed(project, host, narrator, only));
455
+ }
360
456
 
361
457
  // ../aula-project/src/workspace.ts
362
458
  import * as Engine from "@beff/aula";
@@ -439,12 +535,11 @@ function localProject(name, folder, section, definition, host) {
439
535
  }
440
536
 
441
537
  // ../aula-project/src/videos.ts
442
- import { FPS as FPS4 } from "@beff/aula/run";
538
+ import { FPS as FPS5 } from "@beff/aula/run";
443
539
  import { estimateNarration } from "@beff/aula/text";
444
540
 
445
541
  export {
446
542
  requireMatchingAulaVersion,
447
- scriptView,
448
543
  clock,
449
544
  narrationAt,
450
545
  checkProject,
@@ -460,8 +555,10 @@ export {
460
555
  previewJobs,
461
556
  pictureStills,
462
557
  pictureGroups,
558
+ timedChapter,
463
559
  movesMarkdown,
464
560
  timelineView,
561
+ scriptView,
465
562
  workspaceHost,
466
563
  loadBuiltProjects
467
564
  };
@@ -34,9 +34,10 @@ import {
34
34
  previewTargets,
35
35
  scriptView,
36
36
  targetChapters,
37
+ timedChapter,
37
38
  timelineView,
38
39
  wordNotes
39
- } from "./chunk-L75GJLCT.js";
40
+ } from "./chunk-EDTZIVO7.js";
40
41
  import {
41
42
  narrateScript,
42
43
  scriptAudio,
@@ -972,24 +973,46 @@ function printCounts(capabilities, project, checked) {
972
973
  capabilities.log.out(`other chapters: ${String(errors)} errors, ${String(warnings)} warnings`);
973
974
  capabilities.log.out(rowLine(project, checked));
974
975
  }
976
+ async function timeChapters(capabilities, root, project, texts, only) {
977
+ const names = chapterNames(project);
978
+ const indexes = (only ?? names.map((_, i2) => i2)).filter((i2) => i2 > 0);
979
+ if (indexes.length === 0) return [];
980
+ return withHeavy(capabilities, async () => {
981
+ const n = await clock(capabilities.narrator, narrationScript(project, texts), only, names);
982
+ const h = host(capabilities, root);
983
+ const warnings = [];
984
+ for (const index of indexes) {
985
+ const drawn = renderChapter(project, index, {
986
+ host: h,
987
+ narration: narrationAt(n, index),
988
+ lint: true
989
+ });
990
+ warnings.push(...drawn.diagnostics.filter((d) => !isError(d)));
991
+ }
992
+ return warnings;
993
+ });
994
+ }
975
995
  async function check(capabilities, root, project, only, json = false) {
976
996
  const chapters = chapterIndexes(project, only);
977
997
  const checked = checkProject(project, host(capabilities, root), chapters);
998
+ const timing = checked.errors === 0 ? await timeChapters(capabilities, root, project, checked.texts, chapters) : [];
999
+ const findings = [...checked.findings, ...timing];
1000
+ const warnings = checked.warnings + timing.length;
978
1001
  const notes = wordNotes(narrationScript(project, checked.texts), chapters);
979
1002
  if (json) {
980
- const { findings, others, errors, warnings, open } = checked;
1003
+ const { others, errors, open } = checked;
981
1004
  const result = { name: nameOf(project), errors, warnings, openMoves: open, others, findings, notes };
982
1005
  capabilities.log.out(JSON.stringify(result, null, 2));
983
1006
  return errors === 0;
984
1007
  }
985
- await printDiagnostics(capabilities, root, checked.findings);
1008
+ await printDiagnostics(capabilities, root, findings);
986
1009
  for (const note of notes) capabilities.log.out(noteLine(note));
987
1010
  if (notes.length > 0) capabilities.log.out(notesLine(notes));
988
- printCounts(capabilities, project, checked);
1011
+ printCounts(capabilities, project, { ...checked, findings, warnings });
989
1012
  return checked.errors === 0;
990
1013
  }
991
- async function script(capabilities, root, project) {
992
- capabilities.log.write(scriptView(project, host(capabilities, root)));
1014
+ async function script(capabilities, root, project, only) {
1015
+ capabilities.log.write(await scriptView(project, host(capabilities, root), capabilities.narrator, only));
993
1016
  return true;
994
1017
  }
995
1018
  async function timeline(capabilities, root, project, only) {
@@ -1027,7 +1050,8 @@ async function preview(capabilities, root, project, folder, given) {
1027
1050
  const groups = inFolder(folderOf(project), pictureGroups(window, stills));
1028
1051
  const sheets = await capabilities.render.pictures({ lottie, out, groups });
1029
1052
  await capabilities.fs.mkdir(out, { recursive: true });
1030
- await capabilities.fs.writeFile(path2.join(out, "moves.md"), movesMarkdown(stills));
1053
+ const moves = job.text === null ? "title card\n" : movesMarkdown(timedChapter(job.index, job.name, job.text, drawn.narration));
1054
+ await capabilities.fs.writeFile(path2.join(out, "moves.md"), moves);
1031
1055
  job.written.push(path2.join(out, "moves.md"), ...sheets);
1032
1056
  });
1033
1057
  });
package/dist/src/cli.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  studentWeightFile,
15
15
  timeAulaVoice,
16
16
  tokenBatches
17
- } from "./chunk-Q5GA52JZ.js";
17
+ } from "./chunk-AKBT72QJ.js";
18
18
 
19
19
  // src/cli.ts
20
20
  import { spawn } from "node:child_process";
@@ -280,9 +280,9 @@ var base = Capabilities.create({
280
280
  },
281
281
  spawn
282
282
  });
283
- var { diagnosticsOf, printDiagnostics } = await import("./problems-ZPV2ADYA.js");
283
+ var { diagnosticsOf, printDiagnostics } = await import("./problems-Q4WAM4GF.js");
284
284
  var { host, loadProject } = await import("./project-MCSMU7LQ.js");
285
- var { USAGE, folderArgs, isHelp, optionsOf, parse, run: run2, siteOptions, webOptions } = await import("./run-RSLSQESN.js");
285
+ var { USAGE, folderArgs, isHelp, optionsOf, parse, run: run2, siteOptions, webOptions } = await import("./run-3Q4HQSAQ.js");
286
286
  var locks = createLocks(base, path3.join(os.homedir(), ".cache/aula/heavy.lock"));
287
287
  var render = createRender(base, process.execPath);
288
288
  var models = path3.join(os.homedir(), ".cache/aula/models");
@@ -305,10 +305,10 @@ async function main(argv) {
305
305
  }
306
306
  const args = parse(rest, optionsOf(command));
307
307
  if (command === "web") {
308
- const { assertAulaVersion } = await import("./aula-version-6SX7JIS4.js");
308
+ const { assertAulaVersion } = await import("./aula-version-2DF4P4QU.js");
309
309
  const options2 = webOptions(cwd, args);
310
310
  assertAulaVersion(capabilities, options2.root);
311
- const { serve } = await import("./server-X6EO4JBG.js");
311
+ const { serve } = await import("./server-3ODXWDEU.js");
312
312
  const stop = new AbortController();
313
313
  for (const signal of ["SIGINT", "SIGTERM"]) process.once(signal, () => stop.abort());
314
314
  const web = Capabilities.create({
@@ -324,22 +324,22 @@ async function main(argv) {
324
324
  return 0;
325
325
  }
326
326
  if (command === "site") {
327
- const { site } = await import("./site-BEDOC3S3.js");
327
+ const { site } = await import("./site-2PE6SEQF.js");
328
328
  const weights = Capabilities.create({ weights: aulaVoiceWeights(base, fetch, models) });
329
329
  return await site(Capabilities.extend(capabilities, weights), siteOptions(cwd, args)) ? 0 : 1;
330
330
  }
331
331
  if (command === "tokens") {
332
- const { tokens, tokensArgs } = await import("./commands-C3ER3SKG.js");
332
+ const { tokens, tokensArgs } = await import("./commands-BPEGSWPJ.js");
333
333
  tokensArgs(args.positional);
334
334
  const tokensOf = createTokens();
335
335
  return await tokens(capabilities, tokensOf, createInterface({ input: process.stdin, crlfDelay: Infinity })) ? 0 : 1;
336
336
  }
337
337
  const { folder, rest: after } = folderArgs(cwd, command, args);
338
338
  if (command === "check") {
339
- const { assertAulaVersion } = await import("./aula-version-6SX7JIS4.js");
339
+ const { assertAulaVersion } = await import("./aula-version-2DF4P4QU.js");
340
340
  assertAulaVersion(capabilities, folder);
341
341
  }
342
- const only = command === "preview" ? after.slice(1) : command === "check" || command === "timeline" ? after : [];
342
+ const only = command === "preview" ? after.slice(1) : command === "check" || command === "timeline" || command === "script" ? after : [];
343
343
  const project = await loadProject(capabilities, cwd, folder, only);
344
344
  return await run2(capabilities, cwd, command, project, after, args.flags) ? 0 : 1;
345
345
  }
@@ -7,16 +7,16 @@ import {
7
7
  timeline,
8
8
  tokens,
9
9
  tokensArgs
10
- } from "./chunk-S7DEFSFH.js";
10
+ } from "./chunk-KND7IF3K.js";
11
11
  import "./chunk-THQ5Y74K.js";
12
12
  import "./chunk-BLKXJGEO.js";
13
13
  import "./chunk-2XGNOG2U.js";
14
14
  import "./chunk-H3SCHOAT.js";
15
15
  import "./chunk-OLAUZCE4.js";
16
16
  import "./chunk-CO6PVRRP.js";
17
- import "./chunk-L75GJLCT.js";
17
+ import "./chunk-EDTZIVO7.js";
18
18
  import "./chunk-S74JLCZK.js";
19
- import "./chunk-Q5GA52JZ.js";
19
+ import "./chunk-AKBT72QJ.js";
20
20
  import "./chunk-TYPWU6EF.js";
21
21
  export {
22
22
  bundle,
@@ -2,9 +2,9 @@ import {
2
2
  printDiagnostics
3
3
  } from "./chunk-H3SCHOAT.js";
4
4
  import "./chunk-CO6PVRRP.js";
5
- import "./chunk-L75GJLCT.js";
5
+ import "./chunk-EDTZIVO7.js";
6
6
  import "./chunk-S74JLCZK.js";
7
- import "./chunk-Q5GA52JZ.js";
7
+ import "./chunk-AKBT72QJ.js";
8
8
  import {
9
9
  diagnosticsOf
10
10
  } from "./chunk-TYPWU6EF.js";
@@ -5,16 +5,16 @@ import {
5
5
  preview,
6
6
  script,
7
7
  timeline
8
- } from "./chunk-S7DEFSFH.js";
8
+ } from "./chunk-KND7IF3K.js";
9
9
  import "./chunk-THQ5Y74K.js";
10
10
  import "./chunk-BLKXJGEO.js";
11
11
  import "./chunk-2XGNOG2U.js";
12
12
  import "./chunk-H3SCHOAT.js";
13
13
  import "./chunk-OLAUZCE4.js";
14
14
  import "./chunk-CO6PVRRP.js";
15
- import "./chunk-L75GJLCT.js";
15
+ import "./chunk-EDTZIVO7.js";
16
16
  import "./chunk-S74JLCZK.js";
17
- import "./chunk-Q5GA52JZ.js";
17
+ import "./chunk-AKBT72QJ.js";
18
18
  import {
19
19
  wrongArgument
20
20
  } from "./chunk-TYPWU6EF.js";
@@ -52,10 +52,11 @@ aula site <folder> <out> [--title <text>] [--base <path>]
52
52
  static host; --title is the site's title (default:
53
53
  the folder's name); --base pins the site to a base
54
54
  path such as /aula/ (default: it works at any path)
55
- aula script <folder> print the narration text with lines
55
+ aula script <folder> [<chapter> ...] the review script: each chapter with its length,
56
+ each spoken beat and what is on screen
56
57
  aula timeline <folder> [<chapter> ...]
57
58
  print each say and move with its line, second
58
- and note
59
+ and note (agent view)
59
60
  aula tokens Kokoro v1.0's token ids of texts, for training
60
61
  data: reads JSON lines {"id"?, "text"} on
61
62
  stdin, writes {"id"?, "batches": [{"phonemes",
@@ -103,7 +104,7 @@ var ARITY = {
103
104
  preview: [1, Infinity],
104
105
  export: [1, 1],
105
106
  bundle: [1, 1],
106
- script: [0, 0],
107
+ script: [0, Infinity],
107
108
  timeline: [0, Infinity]
108
109
  };
109
110
  function folderArgs(cwd, command, args) {
@@ -127,7 +128,7 @@ async function run(capabilities, cwd, command, project, rest, flags = /* @__PURE
127
128
  case "bundle":
128
129
  return bundle(capabilities, project, path.resolve(cwd, first));
129
130
  case "script":
130
- return script(capabilities, cwd, project);
131
+ return script(capabilities, cwd, project, rest);
131
132
  case "timeline":
132
133
  return timeline(capabilities, cwd, project, rest);
133
134
  default:
@@ -12,7 +12,7 @@ import "./chunk-CO6PVRRP.js";
12
12
  import "./chunk-S74JLCZK.js";
13
13
  import {
14
14
  SERVER_WEIGHTS_PATH
15
- } from "./chunk-Q5GA52JZ.js";
15
+ } from "./chunk-AKBT72QJ.js";
16
16
  import {
17
17
  bundleWorkspace
18
18
  } from "./chunk-TYPWU6EF.js";
@@ -8,11 +8,11 @@ import {
8
8
  import {
9
9
  loadBuiltProjects,
10
10
  workspaceHost
11
- } from "./chunk-L75GJLCT.js";
11
+ } from "./chunk-EDTZIVO7.js";
12
12
  import "./chunk-S74JLCZK.js";
13
13
  import {
14
14
  AULA_VOICE_WEIGHTS
15
- } from "./chunk-Q5GA52JZ.js";
15
+ } from "./chunk-AKBT72QJ.js";
16
16
  import {
17
17
  Problems,
18
18
  bundleWorkspace,
@@ -0,0 +1 @@
1
+ import{t as e}from"./aula-voice-worker-D-T3qZPJ.js";var t=/* @__PURE__ */ e(((e,t)=>{t.exports={}}));export default t();