mulmocast 2.9.0 → 2.9.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 (127) hide show
  1. package/lib/actions/movie.d.ts +2 -9
  2. package/lib/actions/movie.js +149 -147
  3. package/lib/agents/image_google_agent.d.ts +5 -0
  4. package/lib/agents/image_google_agent.js +86 -0
  5. package/lib/agents/movie_google_agent.d.ts +9 -0
  6. package/lib/agents/movie_google_agent.js +122 -0
  7. package/lib/agents/mulmo_prompts_agent.d.ts +7 -0
  8. package/lib/agents/mulmo_prompts_agent.js +37 -0
  9. package/lib/agents/prompts_data.d.ts +15 -0
  10. package/lib/agents/prompts_data.js +16 -0
  11. package/lib/agents/tts_nijivoice_agent.d.ts +5 -0
  12. package/lib/agents/tts_nijivoice_agent.js +69 -0
  13. package/lib/agents/validate_mulmo_script_agent.d.ts +17 -0
  14. package/lib/agents/validate_mulmo_script_agent.js +34 -0
  15. package/lib/cli/args.d.ts +15 -0
  16. package/lib/cli/args.js +62 -0
  17. package/lib/cli/bin.js +0 -0
  18. package/lib/cli/cli.d.ts +17 -0
  19. package/lib/cli/cli.js +117 -0
  20. package/lib/cli/run.d.ts +2 -0
  21. package/lib/cli/run.js +3 -0
  22. package/lib/cli/tool-args.d.ts +16 -0
  23. package/lib/cli/tool-args.js +64 -0
  24. package/lib/cli/tool-cli.d.ts +2 -0
  25. package/lib/cli/tool-cli.js +32 -0
  26. package/lib/cli/tool_commands/prompt/builder.d.ts +4 -0
  27. package/lib/cli/tool_commands/prompt/builder.js +11 -0
  28. package/lib/cli/tool_commands/prompt/handler.d.ts +4 -0
  29. package/lib/cli/tool_commands/prompt/handler.js +14 -0
  30. package/lib/cli/tool_commands/prompt/index.d.ts +4 -0
  31. package/lib/cli/tool_commands/prompt/index.js +4 -0
  32. package/lib/cli/tool_commands/schema/builder.d.ts +2 -0
  33. package/lib/cli/tool_commands/schema/builder.js +3 -0
  34. package/lib/cli/tool_commands/schema/handler.d.ts +2 -0
  35. package/lib/cli/tool_commands/schema/handler.js +12 -0
  36. package/lib/cli/tool_commands/schema/index.d.ts +4 -0
  37. package/lib/cli/tool_commands/schema/index.js +4 -0
  38. package/lib/cli/tool_commands/scripting/builder.d.ts +20 -0
  39. package/lib/cli/tool_commands/scripting/builder.js +63 -0
  40. package/lib/cli/tool_commands/scripting/handler.d.ts +12 -0
  41. package/lib/cli/tool_commands/scripting/handler.js +36 -0
  42. package/lib/cli/tool_commands/scripting/index.d.ts +4 -0
  43. package/lib/cli/tool_commands/scripting/index.js +4 -0
  44. package/lib/index.d.ts +8 -0
  45. package/lib/index.js +8 -0
  46. package/lib/methods/mulmo_beat.d.ts +3 -0
  47. package/lib/methods/mulmo_beat.js +17 -0
  48. package/lib/methods/mulmo_beat_node.d.ts +3 -0
  49. package/lib/methods/mulmo_presentation_style.d.ts +5 -1
  50. package/lib/methods/mulmo_presentation_style.js +43 -1
  51. package/lib/methods/mulmo_script_template.d.ts +4 -0
  52. package/lib/methods/mulmo_script_template.js +6 -0
  53. package/lib/methods/mulmo_studio.d.ts +8 -0
  54. package/lib/methods/mulmo_studio.js +25 -0
  55. package/lib/methods/mulmo_studio_context.d.ts +6 -1
  56. package/lib/methods/mulmo_studio_context.js +36 -1
  57. package/lib/slide/blocks.d.ts +13 -0
  58. package/lib/slide/blocks.js +251 -0
  59. package/lib/slide/index.d.ts +6 -0
  60. package/lib/slide/index.js +7 -0
  61. package/lib/slide/layouts/big_quote.d.ts +2 -0
  62. package/lib/slide/layouts/big_quote.js +19 -0
  63. package/lib/slide/layouts/columns.d.ts +2 -0
  64. package/lib/slide/layouts/columns.js +53 -0
  65. package/lib/slide/layouts/comparison.d.ts +2 -0
  66. package/lib/slide/layouts/comparison.js +25 -0
  67. package/lib/slide/layouts/funnel.d.ts +2 -0
  68. package/lib/slide/layouts/funnel.js +25 -0
  69. package/lib/slide/layouts/grid.d.ts +2 -0
  70. package/lib/slide/layouts/grid.js +38 -0
  71. package/lib/slide/layouts/index.d.ts +3 -0
  72. package/lib/slide/layouts/index.js +46 -0
  73. package/lib/slide/layouts/matrix.d.ts +2 -0
  74. package/lib/slide/layouts/matrix.js +53 -0
  75. package/lib/slide/layouts/split.d.ts +2 -0
  76. package/lib/slide/layouts/split.js +51 -0
  77. package/lib/slide/layouts/stats.d.ts +2 -0
  78. package/lib/slide/layouts/stats.js +23 -0
  79. package/lib/slide/layouts/table.d.ts +2 -0
  80. package/lib/slide/layouts/table.js +10 -0
  81. package/lib/slide/layouts/timeline.d.ts +2 -0
  82. package/lib/slide/layouts/timeline.js +27 -0
  83. package/lib/slide/layouts/title.d.ts +2 -0
  84. package/lib/slide/layouts/title.js +19 -0
  85. package/lib/slide/layouts/waterfall.d.ts +2 -0
  86. package/lib/slide/layouts/waterfall.js +63 -0
  87. package/lib/slide/render.d.ts +17 -0
  88. package/lib/slide/render.js +101 -0
  89. package/lib/slide/schema.d.ts +9309 -0
  90. package/lib/slide/schema.js +434 -0
  91. package/lib/slide/utils.d.ts +76 -0
  92. package/lib/slide/utils.js +243 -0
  93. package/lib/tools/prompt.d.ts +1 -0
  94. package/lib/tools/prompt.js +18 -0
  95. package/lib/tools/seed.d.ts +3 -0
  96. package/lib/tools/seed.js +211 -0
  97. package/lib/tools/seed_from_url.d.ts +3 -0
  98. package/lib/tools/seed_from_url.js +188 -0
  99. package/lib/types/slide.d.ts +9309 -0
  100. package/lib/types/slide.js +434 -0
  101. package/lib/utils/assets.d.ts +18 -0
  102. package/lib/utils/assets.js +101 -0
  103. package/lib/utils/cli.d.ts +1 -0
  104. package/lib/utils/cli.js +15 -0
  105. package/lib/utils/const.d.ts +12 -0
  106. package/lib/utils/const.js +12 -0
  107. package/lib/utils/filters.js +11 -2
  108. package/lib/utils/image_preprocess.d.ts +14 -0
  109. package/lib/utils/image_preprocess.js +52 -0
  110. package/lib/utils/markdown.d.ts +3 -0
  111. package/lib/utils/markdown.js +42 -0
  112. package/lib/utils/pdf.d.ts +9 -0
  113. package/lib/utils/pdf.js +77 -0
  114. package/lib/utils/preprocess.d.ts +343 -0
  115. package/lib/utils/preprocess.js +58 -0
  116. package/lib/utils/provider2agent.d.ts +141 -0
  117. package/lib/utils/provider2agent.js +267 -0
  118. package/lib/utils/text_hash.d.ts +1 -0
  119. package/lib/utils/text_hash.js +4 -0
  120. package/package.json +8 -8
  121. package/scripts/test/test_voice_over_transition_no_audio.json +71 -0
  122. package/lib/utils/sdk_timeout.d.ts +0 -3
  123. package/lib/utils/sdk_timeout.js +0 -7
  124. package/scripts/test/test_captions_2.json~ +0 -278
  125. package/scripts/test/test_en_portrait.json~ +0 -31
  126. package/scripts/test/test_slide_image_ref_gemini_en.json~ +0 -289
  127. package/scripts/test/test_vertexai.json~ +0 -21
@@ -0,0 +1,434 @@
1
+ import { z } from "zod";
2
+ // ═══════════════════════════════════════════════════════════
3
+ // Foundation: Colors & Typography
4
+ // ═══════════════════════════════════════════════════════════
5
+ /** 6-digit hex without '#' prefix, e.g. "3B82F6" */
6
+ const hexColorSchema = z.string().regex(/^[0-9A-Fa-f]{6}$/);
7
+ /** Semantic accent colors usable on cards, badges, borders, etc. */
8
+ export const accentColorKeySchema = z.enum(["primary", "accent", "success", "warning", "danger", "info", "highlight"]);
9
+ export const slideThemeColorsSchema = z.object({
10
+ bg: hexColorSchema,
11
+ bgCard: hexColorSchema,
12
+ bgCardAlt: hexColorSchema,
13
+ text: hexColorSchema,
14
+ textMuted: hexColorSchema,
15
+ textDim: hexColorSchema,
16
+ primary: hexColorSchema,
17
+ accent: hexColorSchema,
18
+ success: hexColorSchema,
19
+ warning: hexColorSchema,
20
+ danger: hexColorSchema,
21
+ info: hexColorSchema,
22
+ highlight: hexColorSchema,
23
+ });
24
+ export const slideThemeFontsSchema = z.object({
25
+ title: z.string(),
26
+ body: z.string(),
27
+ mono: z.string(),
28
+ });
29
+ export const slideThemeSchema = z.object({
30
+ colors: slideThemeColorsSchema,
31
+ fonts: slideThemeFontsSchema,
32
+ });
33
+ // ═══════════════════════════════════════════════════════════
34
+ // Content Blocks — the atoms of slide content
35
+ // ═══════════════════════════════════════════════════════════
36
+ export const textBlockSchema = z.object({
37
+ type: z.literal("text"),
38
+ value: z.string(),
39
+ align: z.enum(["left", "center", "right"]).optional(),
40
+ bold: z.boolean().optional(),
41
+ dim: z.boolean().optional(),
42
+ fontSize: z.number().optional(),
43
+ color: accentColorKeySchema.optional(),
44
+ });
45
+ /** Sub-bullet item: plain string or object with text */
46
+ const subBulletItemSchema = z.union([z.string(), z.object({ text: z.string() })]);
47
+ /** Bullet item: plain string or object with text and optional sub-items (2 levels max) */
48
+ export const bulletItemSchema = z.union([
49
+ z.string(),
50
+ z.object({
51
+ text: z.string(),
52
+ items: z.array(subBulletItemSchema).optional(),
53
+ }),
54
+ ]);
55
+ export const bulletsBlockSchema = z.object({
56
+ type: z.literal("bullets"),
57
+ items: z.array(bulletItemSchema),
58
+ ordered: z.boolean().optional(),
59
+ icon: z.string().optional(),
60
+ });
61
+ export const codeBlockSchema = z.object({
62
+ type: z.literal("code"),
63
+ code: z.string(),
64
+ language: z.string().optional(),
65
+ });
66
+ export const calloutBlockSchema = z.object({
67
+ type: z.literal("callout"),
68
+ text: z.string(),
69
+ label: z.string().optional(),
70
+ color: accentColorKeySchema.optional(),
71
+ style: z.enum(["quote", "info", "warning"]).optional(),
72
+ });
73
+ export const metricBlockSchema = z.object({
74
+ type: z.literal("metric"),
75
+ value: z.string(),
76
+ label: z.string(),
77
+ color: accentColorKeySchema.optional(),
78
+ change: z.string().optional(),
79
+ });
80
+ export const dividerBlockSchema = z.object({
81
+ type: z.literal("divider"),
82
+ color: accentColorKeySchema.optional(),
83
+ });
84
+ export const imageBlockSchema = z.object({
85
+ type: z.literal("image"),
86
+ src: z.string(),
87
+ alt: z.string().optional(),
88
+ fit: z.enum(["contain", "cover"]).optional(),
89
+ });
90
+ export const imageRefBlockSchema = z.object({
91
+ type: z.literal("imageRef"),
92
+ ref: z.string(),
93
+ alt: z.string().optional(),
94
+ fit: z.enum(["contain", "cover"]).optional(),
95
+ });
96
+ export const chartBlockSchema = z.object({
97
+ type: z.literal("chart"),
98
+ chartData: z.record(z.string(), z.unknown()),
99
+ title: z.string().optional(),
100
+ });
101
+ export const mermaidBlockSchema = z.object({
102
+ type: z.literal("mermaid"),
103
+ code: z.string(),
104
+ title: z.string().optional(),
105
+ });
106
+ export const tableCellValueSchema = z.union([
107
+ z.string(),
108
+ z.object({
109
+ text: z.string(),
110
+ color: accentColorKeySchema.optional(),
111
+ bold: z.boolean().optional(),
112
+ badge: z.boolean().optional(),
113
+ }),
114
+ ]);
115
+ export const tableBlockSchema = z.object({
116
+ type: z.literal("table"),
117
+ title: z.string().optional(),
118
+ headers: z.array(z.string()).optional(),
119
+ rows: z.array(z.array(tableCellValueSchema)),
120
+ rowHeaders: z.boolean().optional(),
121
+ striped: z.boolean().optional(),
122
+ });
123
+ /** Block schemas shared between contentBlockSchema and nonSectionContentBlockSchema */
124
+ const baseBlockSchemas = [
125
+ textBlockSchema,
126
+ bulletsBlockSchema,
127
+ codeBlockSchema,
128
+ calloutBlockSchema,
129
+ metricBlockSchema,
130
+ dividerBlockSchema,
131
+ imageBlockSchema,
132
+ imageRefBlockSchema,
133
+ chartBlockSchema,
134
+ mermaidBlockSchema,
135
+ tableBlockSchema,
136
+ ];
137
+ /** All content block types except section (used inside section to prevent recursion) */
138
+ const nonSectionContentBlockSchema = z.discriminatedUnion("type", [...baseBlockSchemas]);
139
+ export const sectionBlockSchema = z.object({
140
+ type: z.literal("section"),
141
+ label: z.string(),
142
+ color: accentColorKeySchema.optional(),
143
+ content: z.array(nonSectionContentBlockSchema).optional(),
144
+ text: z.string().optional(),
145
+ sidebar: z.boolean().optional(),
146
+ });
147
+ export const contentBlockSchema = z.discriminatedUnion("type", [...baseBlockSchemas, sectionBlockSchema]);
148
+ // ═══════════════════════════════════════════════════════════
149
+ // Shared Components
150
+ // ═══════════════════════════════════════════════════════════
151
+ /** Bottom-of-slide callout bar */
152
+ export const calloutBarSchema = z.object({
153
+ text: z.string(),
154
+ label: z.string().optional(),
155
+ color: accentColorKeySchema.optional(),
156
+ align: z.enum(["left", "center"]).optional(),
157
+ leftBar: z.boolean().optional(),
158
+ });
159
+ /** Reusable card definition — used by columns, grid */
160
+ export const cardSchema = z.object({
161
+ title: z.string(),
162
+ accentColor: accentColorKeySchema.optional(),
163
+ content: z.array(contentBlockSchema).optional(),
164
+ footer: z.string().optional(),
165
+ label: z.string().optional(),
166
+ num: z.number().optional(),
167
+ icon: z.string().optional(),
168
+ });
169
+ // ═══════════════════════════════════════════════════════════
170
+ // Slide-level styling — orthogonal to layout
171
+ // ═══════════════════════════════════════════════════════════
172
+ export const slideStyleSchema = z.object({
173
+ bgColor: z.string().optional(),
174
+ decorations: z.boolean().optional(),
175
+ bgOpacity: z.number().optional(),
176
+ footer: z.string().optional(),
177
+ });
178
+ /** Common slide properties shared across all layouts */
179
+ const slideBaseFields = {
180
+ accentColor: accentColorKeySchema.optional(),
181
+ style: slideStyleSchema.optional(),
182
+ };
183
+ // ═══════════════════════════════════════════════════════════
184
+ // Layouts
185
+ // ═══════════════════════════════════════════════════════════
186
+ // ─── title ───
187
+ export const titleSlideSchema = z.object({
188
+ layout: z.literal("title"),
189
+ ...slideBaseFields,
190
+ title: z.string(),
191
+ subtitle: z.string().optional(),
192
+ author: z.string().optional(),
193
+ note: z.string().optional(),
194
+ });
195
+ // ─── columns ───
196
+ export const columnsSlideSchema = z.object({
197
+ layout: z.literal("columns"),
198
+ ...slideBaseFields,
199
+ title: z.string(),
200
+ stepLabel: z.string().optional(),
201
+ subtitle: z.string().optional(),
202
+ columns: z.array(cardSchema),
203
+ showArrows: z.boolean().optional(),
204
+ callout: calloutBarSchema.optional(),
205
+ bottomText: z.string().optional(),
206
+ });
207
+ // ─── comparison ───
208
+ export const comparisonPanelSchema = z.object({
209
+ title: z.string(),
210
+ accentColor: accentColorKeySchema.optional(),
211
+ content: z.array(contentBlockSchema).optional(),
212
+ footer: z.string().optional(),
213
+ });
214
+ export const comparisonSlideSchema = z.object({
215
+ layout: z.literal("comparison"),
216
+ ...slideBaseFields,
217
+ title: z.string(),
218
+ stepLabel: z.string().optional(),
219
+ subtitle: z.string().optional(),
220
+ left: comparisonPanelSchema,
221
+ right: comparisonPanelSchema,
222
+ callout: calloutBarSchema.optional(),
223
+ });
224
+ // ─── grid ───
225
+ export const gridItemSchema = z.object({
226
+ title: z.string(),
227
+ description: z.string().optional(),
228
+ accentColor: accentColorKeySchema.optional(),
229
+ num: z.number().optional(),
230
+ icon: z.string().optional(),
231
+ content: z.array(contentBlockSchema).optional(),
232
+ });
233
+ export const gridSlideSchema = z.object({
234
+ layout: z.literal("grid"),
235
+ ...slideBaseFields,
236
+ title: z.string(),
237
+ subtitle: z.string().optional(),
238
+ gridColumns: z.number().optional(),
239
+ items: z.array(gridItemSchema),
240
+ footer: z.string().optional(),
241
+ });
242
+ // ─── bigQuote ───
243
+ export const bigQuoteSlideSchema = z.object({
244
+ layout: z.literal("bigQuote"),
245
+ ...slideBaseFields,
246
+ quote: z.string(),
247
+ author: z.string().optional(),
248
+ role: z.string().optional(),
249
+ });
250
+ // ─── stats ───
251
+ export const statItemSchema = z.object({
252
+ value: z.string(),
253
+ label: z.string(),
254
+ color: accentColorKeySchema.optional(),
255
+ change: z.string().optional(),
256
+ });
257
+ export const statsSlideSchema = z.object({
258
+ layout: z.literal("stats"),
259
+ ...slideBaseFields,
260
+ title: z.string(),
261
+ stepLabel: z.string().optional(),
262
+ subtitle: z.string().optional(),
263
+ stats: z.array(statItemSchema),
264
+ callout: calloutBarSchema.optional(),
265
+ });
266
+ // ─── timeline ───
267
+ export const timelineItemSchema = z.object({
268
+ date: z.string(),
269
+ title: z.string(),
270
+ description: z.string().optional(),
271
+ color: accentColorKeySchema.optional(),
272
+ done: z.boolean().optional(),
273
+ });
274
+ export const timelineSlideSchema = z.object({
275
+ layout: z.literal("timeline"),
276
+ ...slideBaseFields,
277
+ title: z.string(),
278
+ stepLabel: z.string().optional(),
279
+ subtitle: z.string().optional(),
280
+ items: z.array(timelineItemSchema),
281
+ });
282
+ // ─── split ───
283
+ export const splitPanelSchema = z.object({
284
+ title: z.string().optional(),
285
+ subtitle: z.string().optional(),
286
+ label: z.string().optional(),
287
+ labelBadge: z.boolean().optional(),
288
+ accentColor: accentColorKeySchema.optional(),
289
+ content: z.array(contentBlockSchema).optional(),
290
+ dark: z.boolean().optional(),
291
+ ratio: z.number().optional(),
292
+ valign: z.enum(["top", "center", "bottom"]).optional(),
293
+ });
294
+ export const splitSlideSchema = z.object({
295
+ layout: z.literal("split"),
296
+ ...slideBaseFields,
297
+ left: splitPanelSchema.optional(),
298
+ right: splitPanelSchema.optional(),
299
+ });
300
+ // ─── matrix ───
301
+ export const matrixCellSchema = z.object({
302
+ label: z.string(),
303
+ items: z.array(z.string()).optional(),
304
+ content: z.array(contentBlockSchema).optional(),
305
+ accentColor: accentColorKeySchema.optional(),
306
+ });
307
+ export const matrixSlideSchema = z.object({
308
+ layout: z.literal("matrix"),
309
+ ...slideBaseFields,
310
+ title: z.string(),
311
+ stepLabel: z.string().optional(),
312
+ subtitle: z.string().optional(),
313
+ rows: z.number().optional(),
314
+ cols: z.number().optional(),
315
+ xAxis: z
316
+ .object({
317
+ low: z.string().optional(),
318
+ high: z.string().optional(),
319
+ label: z.string().optional(),
320
+ })
321
+ .optional(),
322
+ yAxis: z
323
+ .object({
324
+ low: z.string().optional(),
325
+ high: z.string().optional(),
326
+ label: z.string().optional(),
327
+ })
328
+ .optional(),
329
+ cells: z.array(matrixCellSchema),
330
+ });
331
+ // ─── table ───
332
+ export const tableSlideSchema = z.object({
333
+ layout: z.literal("table"),
334
+ ...slideBaseFields,
335
+ title: z.string(),
336
+ stepLabel: z.string().optional(),
337
+ subtitle: z.string().optional(),
338
+ headers: z.array(z.string()),
339
+ rows: z.array(z.array(tableCellValueSchema)),
340
+ rowHeaders: z.boolean().optional(),
341
+ striped: z.boolean().optional(),
342
+ callout: calloutBarSchema.optional(),
343
+ });
344
+ // ─── waterfall ───
345
+ export const waterfallItemSchema = z.object({
346
+ label: z.string(),
347
+ value: z.number(),
348
+ isTotal: z.boolean().optional(),
349
+ color: accentColorKeySchema.optional(),
350
+ });
351
+ export const waterfallSlideSchema = z.object({
352
+ layout: z.literal("waterfall"),
353
+ ...slideBaseFields,
354
+ title: z.string(),
355
+ stepLabel: z.string().optional(),
356
+ subtitle: z.string().optional(),
357
+ items: z.array(waterfallItemSchema),
358
+ unit: z.string().optional(),
359
+ callout: calloutBarSchema.optional(),
360
+ });
361
+ // ─── funnel ───
362
+ export const funnelStageSchema = z.object({
363
+ label: z.string(),
364
+ value: z.string().optional(),
365
+ description: z.string().optional(),
366
+ color: accentColorKeySchema.optional(),
367
+ });
368
+ export const funnelSlideSchema = z.object({
369
+ layout: z.literal("funnel"),
370
+ ...slideBaseFields,
371
+ title: z.string(),
372
+ stepLabel: z.string().optional(),
373
+ subtitle: z.string().optional(),
374
+ stages: z.array(funnelStageSchema),
375
+ callout: calloutBarSchema.optional(),
376
+ });
377
+ // ═══════════════════════════════════════════════════════════
378
+ // Branding — logo & background image overlay
379
+ // ═══════════════════════════════════════════════════════════
380
+ /**
381
+ * Media source for branding assets (self-contained definition to avoid
382
+ * circular dependency with src/types/schema.ts).
383
+ */
384
+ const slideMediaSourceSchema = z.discriminatedUnion("kind", [
385
+ z.object({ kind: z.literal("url"), url: z.url() }).strict(),
386
+ z.object({ kind: z.literal("base64"), data: z.string().min(1) }).strict(),
387
+ z.object({ kind: z.literal("path"), path: z.string().min(1) }).strict(),
388
+ ]);
389
+ const slideBackgroundImageSourceSchema = z.object({
390
+ source: slideMediaSourceSchema,
391
+ size: z.enum(["cover", "contain", "fill", "auto"]).optional(),
392
+ opacity: z.number().min(0).max(1).optional(),
393
+ bgOpacity: z.number().min(0).max(1).optional(),
394
+ });
395
+ export const slideBrandingLogoSchema = z
396
+ .object({
397
+ source: slideMediaSourceSchema,
398
+ position: z.enum(["top-left", "top-right", "bottom-left", "bottom-right"]).default("top-right"),
399
+ width: z.number().positive().default(120),
400
+ })
401
+ .strict();
402
+ export const slideBrandingSchema = z
403
+ .object({
404
+ logo: slideBrandingLogoSchema.optional(),
405
+ backgroundImage: slideBackgroundImageSourceSchema.optional(),
406
+ })
407
+ .strict();
408
+ // ═══════════════════════════════════════════════════════════
409
+ // Slide Union & Media Schema
410
+ // ═══════════════════════════════════════════════════════════
411
+ export const slideLayoutSchema = z.discriminatedUnion("layout", [
412
+ titleSlideSchema,
413
+ columnsSlideSchema,
414
+ comparisonSlideSchema,
415
+ gridSlideSchema,
416
+ bigQuoteSlideSchema,
417
+ statsSlideSchema,
418
+ timelineSlideSchema,
419
+ splitSlideSchema,
420
+ matrixSlideSchema,
421
+ tableSlideSchema,
422
+ funnelSlideSchema,
423
+ waterfallSlideSchema,
424
+ ]);
425
+ /** Media schema registered in mulmoImageAssetSchema */
426
+ export const mulmoSlideMediaSchema = z
427
+ .object({
428
+ type: z.literal("slide"),
429
+ theme: slideThemeSchema.optional(),
430
+ slide: slideLayoutSchema,
431
+ reference: z.string().optional(),
432
+ branding: slideBrandingSchema.nullable().optional(),
433
+ })
434
+ .strict();
@@ -0,0 +1,18 @@
1
+ type BgmAsset = {
2
+ name: string;
3
+ title: string;
4
+ url: string;
5
+ suno_url: string;
6
+ date: string;
7
+ duration: string;
8
+ account: string;
9
+ original_license: string;
10
+ prompt: string;
11
+ model: string;
12
+ };
13
+ export type BgmAssets = {
14
+ license: string;
15
+ bgms: BgmAsset[];
16
+ };
17
+ export declare const bgmAssets: BgmAssets;
18
+ export {};
@@ -0,0 +1,101 @@
1
+ export const bgmAssets = {
2
+ license: "Free to distribute as the BMG of media generated by MulmoCast, including commercial use.",
3
+ bgms: [
4
+ {
5
+ name: "story001.mp3",
6
+ title: "Whispered Melody",
7
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/story001.mp3",
8
+ suno_url: "https://suno.com/s/v6zer50aQJu8Y0qA",
9
+ date: "2025-06-17",
10
+ duration: "03:17",
11
+ account: "@snakajima",
12
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
13
+ prompt: "instrumental, smooth, piano",
14
+ model: "v4.5 beta",
15
+ },
16
+ {
17
+ name: "story002.mp3",
18
+ title: "Rise and Shine",
19
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/story002.mp3",
20
+ suno_url: "https://suno.com/s/mJnvyu3UXnkdAPfQ",
21
+ date: "2025-06-17",
22
+ duration: "04:04",
23
+ account: "@snakajima",
24
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
25
+ prompt: "techno, inspiring, piano",
26
+ model: "v4.5 beta",
27
+ },
28
+ {
29
+ name: "story003.mp3",
30
+ title: "Chasing the Sunset",
31
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/story003.mp3",
32
+ suno_url: "https://suno.com/s/2zGjMQ9vURJbaMZA",
33
+ date: "2025-06-17",
34
+ duration: "02:49",
35
+ account: "@snakajima",
36
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
37
+ prompt: "piano, inspiring, sunset",
38
+ model: "v4.5 beta",
39
+ },
40
+ {
41
+ name: "story004.mp3",
42
+ title: "Whispering Keys",
43
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/story004.mp3",
44
+ suno_url: "https://suno.com/s/0SFoBRsBWsncw6tu",
45
+ date: "2025-06-17",
46
+ duration: "04:00",
47
+ account: "@snakajima",
48
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
49
+ prompt: "Piano, classical, ambient",
50
+ model: "v4",
51
+ },
52
+ {
53
+ name: "story005.mp3",
54
+ title: "Whisper of Ivory",
55
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/story005.mp3",
56
+ suno_url: "https://suno.com/s/0SFoBRsBWsncw6tu",
57
+ date: "2025-06-17",
58
+ duration: "04:00",
59
+ account: "@snakajima",
60
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
61
+ prompt: "Piano solo, classical, ambient",
62
+ model: "v4",
63
+ },
64
+ {
65
+ name: "theme001.mp3",
66
+ title: "Rise of the Flame",
67
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/theme001.mp3",
68
+ suno_url: "https://suno.com/s/WhYOf8oJYhBgSKET",
69
+ date: "2025-06-20",
70
+ duration: "03:23",
71
+ account: "@snakajima",
72
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
73
+ prompt: "Olympic Theme, classical, emotional",
74
+ model: "v4",
75
+ },
76
+ {
77
+ name: "olympic001.mp3",
78
+ title: "Olympic-style Theme Music",
79
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/olympic001.mp3",
80
+ suno_url: "https://suno.com/s/32wpnmCrkFVvkTSQ",
81
+ date: "2025-07-17",
82
+ duration: "02:54",
83
+ account: "@snakajima",
84
+ original_license: "Generated by Suno with commercial use rights (PRO Plan)",
85
+ prompt: "Epic orchestral fanfare in the style of John Williams' Olympic Fanfare and Theme. Bright brass fanfare, soaring strings, powerful percussion, and heroic French horn melodies. Triumphant and majestic mood, suitable for an opening ceremony or national celebration. Emphasize dynamic builds, rich harmonies, and cinematic grandeur.",
86
+ model: "v4.5+",
87
+ },
88
+ {
89
+ name: "morning001.mp3",
90
+ title: "Morning Dance",
91
+ url: "https://github.com/receptron/mulmocast-media/raw/refs/heads/main/bgms/morning001.mp3",
92
+ suno_url: "https://suno.com/s/9MTkutZYqxeyBlwK",
93
+ date: "2025-07-17",
94
+ duration: "03:52",
95
+ account: "@snakajima",
96
+ original_license: "morning, piano solo, Japanese name, sexy",
97
+ prompt: "morning, piano solo, Japanese name, sexy",
98
+ model: "v4.5+",
99
+ },
100
+ ],
101
+ };
@@ -0,0 +1 @@
1
+ export declare const setGraphAILogger: (verbose: boolean | undefined, logValues?: Record<string, unknown>) => void;
@@ -0,0 +1,15 @@
1
+ import { GraphAILogger } from "graphai";
2
+ export const setGraphAILogger = (verbose, logValues) => {
3
+ if (verbose) {
4
+ if (logValues) {
5
+ Object.entries(logValues).forEach(([key, value]) => {
6
+ GraphAILogger.info(`${key}:`, value);
7
+ });
8
+ }
9
+ }
10
+ else {
11
+ GraphAILogger.setLevelEnabled("error", false);
12
+ GraphAILogger.setLevelEnabled("log", false);
13
+ GraphAILogger.setLevelEnabled("warn", false);
14
+ }
15
+ };
@@ -0,0 +1,12 @@
1
+ export declare const currentMulmoScriptVersion = "1.1";
2
+ export declare const outDirName = "output";
3
+ export declare const audioDirName = "audio";
4
+ export declare const imageDirName = "images";
5
+ export declare const cacheDirName = "cache";
6
+ export declare const pdf_modes: string[];
7
+ export declare const pdf_sizes: string[];
8
+ export declare const languages: string[];
9
+ export declare const storyToScriptGenerateMode: {
10
+ stepWise: string;
11
+ oneStep: string;
12
+ };
@@ -0,0 +1,12 @@
1
+ export const currentMulmoScriptVersion = "1.1";
2
+ export const outDirName = "output";
3
+ export const audioDirName = "audio";
4
+ export const imageDirName = "images";
5
+ export const cacheDirName = "cache";
6
+ export const pdf_modes = ["slide", "talk", "handout"];
7
+ export const pdf_sizes = ["letter", "a4"];
8
+ export const languages = ["en", "ja", "fr", "es", "de", "zh-CN", "zh-TW", "ko", "it", "pt", "ar", "hi"];
9
+ export const storyToScriptGenerateMode = {
10
+ stepWise: "step_wise",
11
+ oneStep: "one_step",
12
+ };
@@ -31,13 +31,22 @@ export const fileCacheAgentFilter = async (context, next) => {
31
31
  GraphAILogger.debug(`cache: ${path.basename(file)}`);
32
32
  return true;
33
33
  }
34
+ // The media payload is on disk by the time we return, and no downstream node reads it, so it
35
+ // must not become part of the node result: GraphAI keeps every node result (and a debug key for
36
+ // each of its leaves) alive for the whole run. Buffers are array-like, so that key walk expands
37
+ // one media buffer into a key per byte (~280x its size), which is what made memory grow with
38
+ // the beat count. Keep `usage` — createUsageCallback reads it off the transaction log.
39
+ const withoutPayload = (output) => {
40
+ const { buffer: __buffer, ...rest } = output;
41
+ return rest;
42
+ };
34
43
  const backup = withBackup && withBackup.some((element) => element);
35
44
  try {
36
45
  MulmoStudioContextMethods.setBeatSessionState(mulmoContext, sessionType, index, id, true);
37
46
  const output = (await next(context)) || undefined;
38
47
  const { buffer, text, saved } = output ?? {};
39
48
  if (saved) {
40
- return output;
49
+ return withoutPayload(output ?? {});
41
50
  }
42
51
  if (buffer) {
43
52
  writingMessage(file);
@@ -45,7 +54,7 @@ export const fileCacheAgentFilter = async (context, next) => {
45
54
  if (backup) {
46
55
  await fsPromise.writeFile(getBackupFilePath(file), buffer);
47
56
  }
48
- return output;
57
+ return withoutPayload(output ?? {});
49
58
  }
50
59
  else if (text) {
51
60
  writingMessage(file);
@@ -0,0 +1,14 @@
1
+ import { MulmoStudioBeat, MulmoStudioContext, MulmoCanvasDimension } from "../types/index.js";
2
+ type ImageProcessorParams = {
3
+ beat: MulmoStudioBeat;
4
+ context: MulmoStudioContext;
5
+ imagePath: string;
6
+ textSlideStyle: string;
7
+ canvasSize: MulmoCanvasDimension;
8
+ };
9
+ export declare const processTextSlide: (params: ImageProcessorParams) => Promise<void>;
10
+ export declare const processMarkdown: (params: ImageProcessorParams) => Promise<void>;
11
+ export declare const processImage: (params: ImageProcessorParams) => string | undefined;
12
+ export declare const processChart: (params: ImageProcessorParams) => Promise<void>;
13
+ export declare const processMermaid: (params: ImageProcessorParams) => Promise<void>;
14
+ export {};