mulmocast 1.1.1 → 1.1.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 (61) hide show
  1. package/assets/templates/akira_comic.json +1 -1
  2. package/assets/templates/ani.json +1 -1
  3. package/assets/templates/ani_ja.json +1 -1
  4. package/assets/templates/business.json +1 -1
  5. package/assets/templates/characters.json +1 -1
  6. package/assets/templates/children_book.json +1 -1
  7. package/assets/templates/coding.json +1 -1
  8. package/assets/templates/comic_strips.json +1 -1
  9. package/assets/templates/drslump_comic.json +1 -1
  10. package/assets/templates/ghibli_comic.json +1 -1
  11. package/assets/templates/ghibli_image_only.json +1 -1
  12. package/assets/templates/ghibli_shorts.json +1 -1
  13. package/assets/templates/ghost_comic.json +1 -1
  14. package/assets/templates/html.json +1 -1
  15. package/assets/templates/onepiece_comic.json +1 -1
  16. package/assets/templates/portrait_movie.json +1 -1
  17. package/assets/templates/realistic_movie.json +1 -1
  18. package/assets/templates/sensei_and_taro.json +1 -1
  19. package/assets/templates/shorts.json +1 -1
  20. package/assets/templates/text_and_image.json +1 -1
  21. package/assets/templates/text_only.json +1 -1
  22. package/assets/templates/trailer.json +1 -1
  23. package/lib/actions/image_agents.d.ts +3 -0
  24. package/lib/actions/image_agents.js +3 -1
  25. package/lib/actions/images.js +5 -5
  26. package/lib/agents/lipsync_replicate_agent.js +19 -4
  27. package/lib/agents/movie_replicate_agent.js +10 -1
  28. package/lib/cli/commands/tool/prompt/builder.js +2 -2
  29. package/lib/cli/commands/tool/scripting/builder.js +2 -2
  30. package/lib/cli/commands/tool/story_to_script/builder.js +2 -2
  31. package/lib/data/promptTemplates.d.ts +48 -294
  32. package/lib/data/promptTemplates.js +25 -411
  33. package/lib/data/scriptTemplates.d.ts +575 -151
  34. package/lib/data/scriptTemplates.js +956 -437
  35. package/lib/index.common.d.ts +1 -0
  36. package/lib/index.common.js +1 -0
  37. package/lib/methods/index.d.ts +0 -1
  38. package/lib/methods/index.js +0 -1
  39. package/lib/methods/mulmo_presentation_style.d.ts +2 -0
  40. package/lib/methods/mulmo_script_template.d.ts +2 -2
  41. package/lib/tools/create_mulmo_script_from_url.js +14 -2
  42. package/lib/tools/create_mulmo_script_interactively.js +2 -1
  43. package/lib/tools/dump_prompt.js +1 -1
  44. package/lib/tools/story_to_script.js +5 -4
  45. package/lib/types/schema.d.ts +92 -92
  46. package/lib/types/schema.js +2 -2
  47. package/lib/types/type.d.ts +3 -3
  48. package/lib/utils/context.d.ts +6 -6
  49. package/lib/utils/file.d.ts +4 -9
  50. package/lib/utils/file.js +26 -49
  51. package/lib/utils/inquirer.js +2 -2
  52. package/lib/utils/preprocess.d.ts +6 -6
  53. package/lib/utils/prompt.d.ts +1 -2
  54. package/lib/utils/prompt.js +0 -14
  55. package/lib/utils/provider2agent.d.ts +2 -0
  56. package/lib/utils/provider2agent.js +20 -1
  57. package/lib/utils/system_prompt.d.ts +1 -0
  58. package/lib/utils/system_prompt.js +1 -0
  59. package/lib/utils/templates.d.ts +3 -0
  60. package/lib/utils/templates.js +46 -0
  61. package/package.json +2 -2
@@ -1,2 +1,3 @@
1
1
  export * from "./types/index.js";
2
2
  export * from "./utils/provider2agent.js";
3
+ export * from "./utils/templates.js";
@@ -1,3 +1,4 @@
1
1
  // Entry point for universal code
2
2
  export * from "./types/index.js";
3
3
  export * from "./utils/provider2agent.js";
4
+ export * from "./utils/templates.js";
@@ -1,5 +1,4 @@
1
1
  export * from "./mulmo_presentation_style.js";
2
- export * from "./mulmo_script_template.js";
3
2
  export * from "./mulmo_studio_context.js";
4
3
  export * from "./mulmo_media_source.js";
5
4
  export * from "./mulmo_beat.js";
@@ -1,5 +1,4 @@
1
1
  export * from "./mulmo_presentation_style.js";
2
- export * from "./mulmo_script_template.js";
3
2
  export * from "./mulmo_studio_context.js";
4
3
  export * from "./mulmo_media_source.js";
5
4
  export * from "./mulmo_beat.js";
@@ -38,6 +38,8 @@ export declare const MulmoPresentationStyleMethods: {
38
38
  models: import("../utils/provider2agent.js").ReplicateModel[];
39
39
  modelParams: Record<import("../utils/provider2agent.js").ReplicateModel, {
40
40
  identifier?: `${string}/${string}:${string}`;
41
+ video: string;
42
+ audio: string;
41
43
  }>;
42
44
  };
43
45
  getConcurrency(presentationStyle: MulmoPresentationStyle): 4 | 16;
@@ -1,4 +1,4 @@
1
- import { MulmoScript, MulmoScriptTemplate } from "../types/index.js";
1
+ import { MulmoScript, MulmoPromptTemplate } from "../types/index.js";
2
2
  export declare const MulmoScriptTemplateMethods: {
3
- getSystemPrompt(template: MulmoScriptTemplate, script?: MulmoScript): string;
3
+ getSystemPrompt(template: MulmoPromptTemplate, script?: MulmoScript): string;
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "dotenv/config";
2
2
  import path from "path";
3
- import { GraphAI } from "graphai";
3
+ import { GraphAI, GraphAILogger } from "graphai";
4
4
  import { openAIAgent } from "@graphai/openai_agent";
5
5
  import { anthropicAgent } from "@graphai/anthropic_agent";
6
6
  import { geminiAgent } from "@graphai/gemini_agent";
@@ -9,7 +9,8 @@ import * as agents from "@graphai/vanilla";
9
9
  import { fileWriteAgent } from "@graphai/vanilla_node_agents";
10
10
  import { browserlessAgent } from "@graphai/browserless_agent";
11
11
  import validateSchemaAgent from "../agents/validate_schema_agent.js";
12
- import { readTemplatePrompt, mkdir, writingMessage } from "../utils/file.js";
12
+ import { mkdir, writingMessage } from "../utils/file.js";
13
+ import { readTemplatePrompt } from "../utils/templates.js";
13
14
  import { browserlessCacheGenerator } from "../utils/filters.js";
14
15
  import { mulmoScriptSchema, urlsSchema } from "../types/schema.js";
15
16
  import { cliLoadingPlugin } from "../utils/plugins.js";
@@ -17,6 +18,9 @@ import { graphDataScriptFromUrlPrompt } from "../utils/prompt.js";
17
18
  import { llmPair } from "../utils/utils.js";
18
19
  import { readFileSync } from "fs";
19
20
  const vanillaAgents = agents.default ?? agents;
21
+ const showErrorMessage = (text) => {
22
+ GraphAILogger.info("\x1b[31m" + text + "\x1b[0m");
23
+ };
20
24
  const graphMulmoScript = {
21
25
  version: 0.5,
22
26
  loop: {
@@ -235,6 +239,10 @@ export const createMulmoScriptFromUrl = async ({ urls, templateName, outDirPath,
235
239
  graph.injectValue("maxTokens", max_tokens);
236
240
  graph.registerCallback(cliLoadingPlugin({ nodeId: "mulmoScript", message: "Generating script..." }));
237
241
  const result = await graph.run();
242
+ if (!result?.writeJSON?.path) {
243
+ showErrorMessage("Script generation failed. Please try again.");
244
+ return;
245
+ }
238
246
  writingMessage(result?.writeJSON?.path ?? "");
239
247
  };
240
248
  export const createMulmoScriptFromFile = async (fileName, { templateName, outDirPath, filename, cacheDirPath, llm, llm_model, verbose }) => {
@@ -263,5 +271,9 @@ export const createMulmoScriptFromFile = async (fileName, { templateName, outDir
263
271
  graph.registerCallback(cliLoadingPlugin({ nodeId: "mulmoScript", message: "Generating script..." }));
264
272
  }
265
273
  const result = await graph.run();
274
+ if (!result?.writeJSON?.path) {
275
+ showErrorMessage("Script generation failed. Please try again.");
276
+ return;
277
+ }
266
278
  writingMessage(result?.writeJSON?.path ?? "");
267
279
  };
@@ -8,7 +8,8 @@ import { geminiAgent } from "@graphai/gemini_agent";
8
8
  import { groqAgent } from "@graphai/groq_agent";
9
9
  import * as agents from "@graphai/vanilla";
10
10
  import { fileWriteAgent } from "@graphai/vanilla_node_agents";
11
- import { readTemplatePrompt, mkdir } from "../utils/file.js";
11
+ import { mkdir } from "../utils/file.js";
12
+ import { readTemplatePrompt } from "../utils/templates.js";
12
13
  import { browserlessCacheGenerator } from "../utils/filters.js";
13
14
  import { mulmoScriptSchema } from "../types/index.js";
14
15
  import { browserlessAgent } from "@graphai/browserless_agent";
@@ -1,5 +1,5 @@
1
1
  import { GraphAILogger } from "graphai";
2
- import { readTemplatePrompt } from "../utils/file.js";
2
+ import { readTemplatePrompt } from "../utils/templates.js";
3
3
  import clipboardy from "clipboardy";
4
4
  export const dumpPromptFromTemplate = async ({ templateName }) => {
5
5
  const prompt = readTemplatePrompt(templateName);
@@ -1,5 +1,6 @@
1
- import { getPromptTemplateFilePath, readAndParseJson, readScriptTemplateFile, writingMessage } from "../utils/file.js";
2
- import { mulmoScriptSchema, mulmoScriptTemplateSchema } from "../types/schema.js";
1
+ import { getPromptTemplateFilePath, readAndParseJson, writingMessage } from "../utils/file.js";
2
+ import { readScriptTemplateFile } from "../utils/templates.js";
3
+ import { mulmoScriptSchema, mulmoPromptTemplateSchema } from "../types/schema.js";
3
4
  import { GraphAI, GraphAILogger } from "graphai";
4
5
  import { openAIAgent } from "@graphai/openai_agent";
5
6
  import { anthropicAgent } from "@graphai/anthropic_agent";
@@ -228,7 +229,7 @@ const oneStepGraphData = {
228
229
  };
229
230
  const generateBeatsPrompt = async (template, beatsPerScene, story) => {
230
231
  const allScenes = story.scenes.map((scene) => scene.description).join("\n");
231
- const sampleBeats = template.scriptName ? readScriptTemplateFile(template.scriptName).beats : [];
232
+ const sampleBeats = template.scriptName ? (readScriptTemplateFile(template.scriptName).beats ?? []) : [];
232
233
  return sceneToBeatsPrompt({ sampleBeats, beatsPerScene, allScenes });
233
234
  };
234
235
  const generateScriptInfoPrompt = async (template, story) => {
@@ -249,7 +250,7 @@ const generateScriptPrompt = async (template, beatsPerScene, story) => {
249
250
  return storyToScriptPrompt(script, beatsPerScene, story);
250
251
  };
251
252
  export const storyToScript = async ({ story, beatsPerScene, templateName, outdir, fileName, llm, llmModel, generateMode, }) => {
252
- const template = readAndParseJson(getPromptTemplateFilePath(templateName), mulmoScriptTemplateSchema);
253
+ const template = readAndParseJson(getPromptTemplateFilePath(templateName), mulmoPromptTemplateSchema);
253
254
  const { agent, model, max_tokens } = llmPair(llm, llmModel);
254
255
  const beatsPrompt = await generateBeatsPrompt(template, beatsPerScene, story);
255
256
  const scriptInfoPrompt = await generateScriptInfoPrompt(template, story);
@@ -2189,12 +2189,6 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2189
2189
  type: "voice_over";
2190
2190
  startAt?: number | undefined;
2191
2191
  } | undefined;
2192
- duration?: number | undefined;
2193
- speechOptions?: {
2194
- speed?: number | undefined;
2195
- instruction?: string | undefined;
2196
- } | undefined;
2197
- id?: string | undefined;
2198
2192
  audio?: {
2199
2193
  type: "audio";
2200
2194
  source: {
@@ -2214,6 +2208,12 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2214
2208
  type: "midi";
2215
2209
  source: string;
2216
2210
  } | undefined;
2211
+ duration?: number | undefined;
2212
+ speechOptions?: {
2213
+ speed?: number | undefined;
2214
+ instruction?: string | undefined;
2215
+ } | undefined;
2216
+ id?: string | undefined;
2217
2217
  imagePrompt?: string | undefined;
2218
2218
  speaker?: string | undefined;
2219
2219
  description?: string | undefined;
@@ -2387,13 +2387,6 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2387
2387
  type: "voice_over";
2388
2388
  startAt?: number | undefined;
2389
2389
  } | undefined;
2390
- text?: string | undefined;
2391
- duration?: number | undefined;
2392
- speechOptions?: {
2393
- speed?: number | undefined;
2394
- instruction?: string | undefined;
2395
- } | undefined;
2396
- id?: string | undefined;
2397
2390
  audio?: {
2398
2391
  type: "audio";
2399
2392
  source: {
@@ -2413,6 +2406,13 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2413
2406
  type: "midi";
2414
2407
  source: string;
2415
2408
  } | undefined;
2409
+ text?: string | undefined;
2410
+ duration?: number | undefined;
2411
+ speechOptions?: {
2412
+ speed?: number | undefined;
2413
+ instruction?: string | undefined;
2414
+ } | undefined;
2415
+ id?: string | undefined;
2416
2416
  imagePrompt?: string | undefined;
2417
2417
  speaker?: string | undefined;
2418
2418
  description?: string | undefined;
@@ -4470,12 +4470,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4470
4470
  type: "voice_over";
4471
4471
  startAt?: number | undefined;
4472
4472
  } | undefined;
4473
- duration?: number | undefined;
4474
- speechOptions?: {
4475
- speed?: number | undefined;
4476
- instruction?: string | undefined;
4477
- } | undefined;
4478
- id?: string | undefined;
4479
4473
  audio?: {
4480
4474
  type: "audio";
4481
4475
  source: {
@@ -4495,6 +4489,12 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4495
4489
  type: "midi";
4496
4490
  source: string;
4497
4491
  } | undefined;
4492
+ duration?: number | undefined;
4493
+ speechOptions?: {
4494
+ speed?: number | undefined;
4495
+ instruction?: string | undefined;
4496
+ } | undefined;
4497
+ id?: string | undefined;
4498
4498
  imagePrompt?: string | undefined;
4499
4499
  speaker?: string | undefined;
4500
4500
  description?: string | undefined;
@@ -4668,13 +4668,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4668
4668
  type: "voice_over";
4669
4669
  startAt?: number | undefined;
4670
4670
  } | undefined;
4671
- text?: string | undefined;
4672
- duration?: number | undefined;
4673
- speechOptions?: {
4674
- speed?: number | undefined;
4675
- instruction?: string | undefined;
4676
- } | undefined;
4677
- id?: string | undefined;
4678
4671
  audio?: {
4679
4672
  type: "audio";
4680
4673
  source: {
@@ -4694,6 +4687,13 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4694
4687
  type: "midi";
4695
4688
  source: string;
4696
4689
  } | undefined;
4690
+ text?: string | undefined;
4691
+ duration?: number | undefined;
4692
+ speechOptions?: {
4693
+ speed?: number | undefined;
4694
+ instruction?: string | undefined;
4695
+ } | undefined;
4696
+ id?: string | undefined;
4697
4697
  imagePrompt?: string | undefined;
4698
4698
  speaker?: string | undefined;
4699
4699
  description?: string | undefined;
@@ -4955,12 +4955,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4955
4955
  type: "voice_over";
4956
4956
  startAt?: number | undefined;
4957
4957
  } | undefined;
4958
- duration?: number | undefined;
4959
- speechOptions?: {
4960
- speed?: number | undefined;
4961
- instruction?: string | undefined;
4962
- } | undefined;
4963
- id?: string | undefined;
4964
4958
  audio?: {
4965
4959
  type: "audio";
4966
4960
  source: {
@@ -4980,6 +4974,12 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4980
4974
  type: "midi";
4981
4975
  source: string;
4982
4976
  } | undefined;
4977
+ duration?: number | undefined;
4978
+ speechOptions?: {
4979
+ speed?: number | undefined;
4980
+ instruction?: string | undefined;
4981
+ } | undefined;
4982
+ id?: string | undefined;
4983
4983
  imagePrompt?: string | undefined;
4984
4984
  speaker?: string | undefined;
4985
4985
  description?: string | undefined;
@@ -5185,13 +5185,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5185
5185
  type: "voice_over";
5186
5186
  startAt?: number | undefined;
5187
5187
  } | undefined;
5188
- text?: string | undefined;
5189
- duration?: number | undefined;
5190
- speechOptions?: {
5191
- speed?: number | undefined;
5192
- instruction?: string | undefined;
5193
- } | undefined;
5194
- id?: string | undefined;
5195
5188
  audio?: {
5196
5189
  type: "audio";
5197
5190
  source: {
@@ -5211,6 +5204,13 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5211
5204
  type: "midi";
5212
5205
  source: string;
5213
5206
  } | undefined;
5207
+ text?: string | undefined;
5208
+ duration?: number | undefined;
5209
+ speechOptions?: {
5210
+ speed?: number | undefined;
5211
+ instruction?: string | undefined;
5212
+ } | undefined;
5213
+ id?: string | undefined;
5214
5214
  imagePrompt?: string | undefined;
5215
5215
  speaker?: string | undefined;
5216
5216
  description?: string | undefined;
@@ -5513,16 +5513,16 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
5513
5513
  pdf: z.ZodBoolean;
5514
5514
  }, "strip", z.ZodTypeAny, {
5515
5515
  image: boolean;
5516
- pdf: boolean;
5517
- audio: boolean;
5518
5516
  video: boolean;
5517
+ audio: boolean;
5518
+ pdf: boolean;
5519
5519
  multiLingual: boolean;
5520
5520
  caption: boolean;
5521
5521
  }, {
5522
5522
  image: boolean;
5523
- pdf: boolean;
5524
- audio: boolean;
5525
5523
  video: boolean;
5524
+ audio: boolean;
5525
+ pdf: boolean;
5526
5526
  multiLingual: boolean;
5527
5527
  caption: boolean;
5528
5528
  }>;
@@ -5538,9 +5538,9 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
5538
5538
  lipSync: z.ZodRecord<z.ZodNumber, z.ZodBoolean>;
5539
5539
  }, "strip", z.ZodTypeAny, {
5540
5540
  image: Record<number, boolean>;
5541
+ audio: Record<number, boolean>;
5541
5542
  movie: Record<number, boolean>;
5542
5543
  html: Record<number, boolean>;
5543
- audio: Record<number, boolean>;
5544
5544
  multiLingual: Record<number, boolean>;
5545
5545
  caption: Record<number, boolean>;
5546
5546
  imageReference: Record<number, boolean>;
@@ -5548,9 +5548,9 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
5548
5548
  lipSync: Record<number, boolean>;
5549
5549
  }, {
5550
5550
  image: Record<number, boolean>;
5551
+ audio: Record<number, boolean>;
5551
5552
  movie: Record<number, boolean>;
5552
5553
  html: Record<number, boolean>;
5553
- audio: Record<number, boolean>;
5554
5554
  multiLingual: Record<number, boolean>;
5555
5555
  caption: Record<number, boolean>;
5556
5556
  imageReference: Record<number, boolean>;
@@ -5560,17 +5560,17 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
5560
5560
  }, "strip", z.ZodTypeAny, {
5561
5561
  inSession: {
5562
5562
  image: boolean;
5563
- pdf: boolean;
5564
- audio: boolean;
5565
5563
  video: boolean;
5564
+ audio: boolean;
5565
+ pdf: boolean;
5566
5566
  multiLingual: boolean;
5567
5567
  caption: boolean;
5568
5568
  };
5569
5569
  inBeatSession: {
5570
5570
  image: Record<number, boolean>;
5571
+ audio: Record<number, boolean>;
5571
5572
  movie: Record<number, boolean>;
5572
5573
  html: Record<number, boolean>;
5573
- audio: Record<number, boolean>;
5574
5574
  multiLingual: Record<number, boolean>;
5575
5575
  caption: Record<number, boolean>;
5576
5576
  imageReference: Record<number, boolean>;
@@ -5580,17 +5580,17 @@ export declare const mulmoSessionStateSchema: z.ZodObject<{
5580
5580
  }, {
5581
5581
  inSession: {
5582
5582
  image: boolean;
5583
- pdf: boolean;
5584
- audio: boolean;
5585
5583
  video: boolean;
5584
+ audio: boolean;
5585
+ pdf: boolean;
5586
5586
  multiLingual: boolean;
5587
5587
  caption: boolean;
5588
5588
  };
5589
5589
  inBeatSession: {
5590
5590
  image: Record<number, boolean>;
5591
+ audio: Record<number, boolean>;
5591
5592
  movie: Record<number, boolean>;
5592
5593
  html: Record<number, boolean>;
5593
- audio: Record<number, boolean>;
5594
5594
  multiLingual: Record<number, boolean>;
5595
5595
  caption: Record<number, boolean>;
5596
5596
  imageReference: Record<number, boolean>;
@@ -6886,12 +6886,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6886
6886
  type: "voice_over";
6887
6887
  startAt?: number | undefined;
6888
6888
  } | undefined;
6889
- duration?: number | undefined;
6890
- speechOptions?: {
6891
- speed?: number | undefined;
6892
- instruction?: string | undefined;
6893
- } | undefined;
6894
- id?: string | undefined;
6895
6889
  audio?: {
6896
6890
  type: "audio";
6897
6891
  source: {
@@ -6911,6 +6905,12 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6911
6905
  type: "midi";
6912
6906
  source: string;
6913
6907
  } | undefined;
6908
+ duration?: number | undefined;
6909
+ speechOptions?: {
6910
+ speed?: number | undefined;
6911
+ instruction?: string | undefined;
6912
+ } | undefined;
6913
+ id?: string | undefined;
6914
6914
  imagePrompt?: string | undefined;
6915
6915
  speaker?: string | undefined;
6916
6916
  description?: string | undefined;
@@ -7084,13 +7084,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7084
7084
  type: "voice_over";
7085
7085
  startAt?: number | undefined;
7086
7086
  } | undefined;
7087
- text?: string | undefined;
7088
- duration?: number | undefined;
7089
- speechOptions?: {
7090
- speed?: number | undefined;
7091
- instruction?: string | undefined;
7092
- } | undefined;
7093
- id?: string | undefined;
7094
7087
  audio?: {
7095
7088
  type: "audio";
7096
7089
  source: {
@@ -7110,6 +7103,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7110
7103
  type: "midi";
7111
7104
  source: string;
7112
7105
  } | undefined;
7106
+ text?: string | undefined;
7107
+ duration?: number | undefined;
7108
+ speechOptions?: {
7109
+ speed?: number | undefined;
7110
+ instruction?: string | undefined;
7111
+ } | undefined;
7112
+ id?: string | undefined;
7113
7113
  imagePrompt?: string | undefined;
7114
7114
  speaker?: string | undefined;
7115
7115
  description?: string | undefined;
@@ -7371,12 +7371,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7371
7371
  type: "voice_over";
7372
7372
  startAt?: number | undefined;
7373
7373
  } | undefined;
7374
- duration?: number | undefined;
7375
- speechOptions?: {
7376
- speed?: number | undefined;
7377
- instruction?: string | undefined;
7378
- } | undefined;
7379
- id?: string | undefined;
7380
7374
  audio?: {
7381
7375
  type: "audio";
7382
7376
  source: {
@@ -7396,6 +7390,12 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7396
7390
  type: "midi";
7397
7391
  source: string;
7398
7392
  } | undefined;
7393
+ duration?: number | undefined;
7394
+ speechOptions?: {
7395
+ speed?: number | undefined;
7396
+ instruction?: string | undefined;
7397
+ } | undefined;
7398
+ id?: string | undefined;
7399
7399
  imagePrompt?: string | undefined;
7400
7400
  speaker?: string | undefined;
7401
7401
  description?: string | undefined;
@@ -7601,13 +7601,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7601
7601
  type: "voice_over";
7602
7602
  startAt?: number | undefined;
7603
7603
  } | undefined;
7604
- text?: string | undefined;
7605
- duration?: number | undefined;
7606
- speechOptions?: {
7607
- speed?: number | undefined;
7608
- instruction?: string | undefined;
7609
- } | undefined;
7610
- id?: string | undefined;
7611
7604
  audio?: {
7612
7605
  type: "audio";
7613
7606
  source: {
@@ -7627,6 +7620,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7627
7620
  type: "midi";
7628
7621
  source: string;
7629
7622
  } | undefined;
7623
+ text?: string | undefined;
7624
+ duration?: number | undefined;
7625
+ speechOptions?: {
7626
+ speed?: number | undefined;
7627
+ instruction?: string | undefined;
7628
+ } | undefined;
7629
+ id?: string | undefined;
7630
7630
  imagePrompt?: string | undefined;
7631
7631
  speaker?: string | undefined;
7632
7632
  description?: string | undefined;
@@ -8052,12 +8052,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8052
8052
  type: "voice_over";
8053
8053
  startAt?: number | undefined;
8054
8054
  } | undefined;
8055
- duration?: number | undefined;
8056
- speechOptions?: {
8057
- speed?: number | undefined;
8058
- instruction?: string | undefined;
8059
- } | undefined;
8060
- id?: string | undefined;
8061
8055
  audio?: {
8062
8056
  type: "audio";
8063
8057
  source: {
@@ -8077,6 +8071,12 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8077
8071
  type: "midi";
8078
8072
  source: string;
8079
8073
  } | undefined;
8074
+ duration?: number | undefined;
8075
+ speechOptions?: {
8076
+ speed?: number | undefined;
8077
+ instruction?: string | undefined;
8078
+ } | undefined;
8079
+ id?: string | undefined;
8080
8080
  imagePrompt?: string | undefined;
8081
8081
  speaker?: string | undefined;
8082
8082
  description?: string | undefined;
@@ -8300,13 +8300,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8300
8300
  type: "voice_over";
8301
8301
  startAt?: number | undefined;
8302
8302
  } | undefined;
8303
- text?: string | undefined;
8304
- duration?: number | undefined;
8305
- speechOptions?: {
8306
- speed?: number | undefined;
8307
- instruction?: string | undefined;
8308
- } | undefined;
8309
- id?: string | undefined;
8310
8303
  audio?: {
8311
8304
  type: "audio";
8312
8305
  source: {
@@ -8326,6 +8319,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8326
8319
  type: "midi";
8327
8320
  source: string;
8328
8321
  } | undefined;
8322
+ text?: string | undefined;
8323
+ duration?: number | undefined;
8324
+ speechOptions?: {
8325
+ speed?: number | undefined;
8326
+ instruction?: string | undefined;
8327
+ } | undefined;
8328
+ id?: string | undefined;
8329
8329
  imagePrompt?: string | undefined;
8330
8330
  speaker?: string | undefined;
8331
8331
  description?: string | undefined;
@@ -8503,7 +8503,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8503
8503
  };
8504
8504
  filename: string;
8505
8505
  }>;
8506
- export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8506
+ export declare const mulmoPromptTemplateSchema: z.ZodObject<{
8507
8507
  title: z.ZodString;
8508
8508
  description: z.ZodString;
8509
8509
  systemPrompt: z.ZodString;
@@ -9312,7 +9312,7 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
9312
9312
  } | undefined;
9313
9313
  } | undefined;
9314
9314
  }>;
9315
- export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
9315
+ export declare const mulmoPromptTemplateFileSchema: z.ZodObject<{
9316
9316
  title: z.ZodString;
9317
9317
  description: z.ZodString;
9318
9318
  systemPrompt: z.ZodString;
@@ -424,7 +424,7 @@ export const mulmoStudioSchema = z
424
424
  beats: z.array(mulmoStudioBeatSchema).min(1),
425
425
  })
426
426
  .strict();
427
- export const mulmoScriptTemplateSchema = z
427
+ export const mulmoPromptTemplateSchema = z
428
428
  .object({
429
429
  title: z.string(),
430
430
  description: z.string(),
@@ -433,7 +433,7 @@ export const mulmoScriptTemplateSchema = z
433
433
  presentationStyle: mulmoPresentationStyleSchema.optional(),
434
434
  })
435
435
  .strict();
436
- export const mulmoScriptTemplateFileSchema = mulmoScriptTemplateSchema.extend({
436
+ export const mulmoPromptTemplateFileSchema = mulmoPromptTemplateSchema.extend({
437
437
  filename: z.string(),
438
438
  });
439
439
  export const mulmoStoryboardSceneSchema = z
@@ -1,4 +1,4 @@
1
- import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualDataSchema, speakerDictionarySchema, mulmoImageParamsSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoScriptTemplateSchema, mulmoScriptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoImageAssetSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
1
+ import { langSchema, localizedTextSchema, mulmoBeatSchema, mulmoScriptSchema, mulmoStudioSchema, mulmoStudioBeatSchema, mulmoStoryboardSchema, mulmoStoryboardSceneSchema, mulmoStudioMultiLingualSchema, mulmoStudioMultiLingualDataSchema, speakerDictionarySchema, mulmoImageParamsSchema, mulmoImageParamsImagesSchema, mulmoFillOptionSchema, mulmoMovieParamsSchema, textSlideParamsSchema, speechOptionsSchema, speakerDataSchema, mulmoCanvasDimensionSchema, mulmoPromptTemplateSchema, mulmoPromptTemplateFileSchema, text2ImageProviderSchema, text2HtmlImageProviderSchema, text2MovieProviderSchema, text2SpeechProviderSchema, mulmoPresentationStyleSchema, multiLingualTextsSchema, mulmoImageAssetSchema, mulmoMermaidMediaSchema, mulmoTextSlideMediaSchema, mulmoMarkdownMediaSchema, mulmoImageMediaSchema, mulmoChartMediaSchema, mediaSourceSchema, mulmoSessionStateSchema, mulmoOpenAIImageModelSchema, mulmoGoogleImageModelSchema, mulmoGoogleMovieModelSchema, mulmoReplicateMovieModelSchema, mulmoImagePromptMediaSchema } from "./schema.js";
2
2
  import { pdf_modes, pdf_sizes, storyToScriptGenerateMode } from "../utils/const.js";
3
3
  import type { LLM } from "../utils/provider2agent.js";
4
4
  import { z } from "zod";
@@ -24,8 +24,8 @@ export type MulmoStoryboard = z.infer<typeof mulmoStoryboardSchema>;
24
24
  export type MulmoStudioBeat = z.infer<typeof mulmoStudioBeatSchema>;
25
25
  export type MulmoMediaSource = z.infer<typeof mediaSourceSchema>;
26
26
  export type MulmoStudio = z.infer<typeof mulmoStudioSchema>;
27
- export type MulmoScriptTemplate = z.infer<typeof mulmoScriptTemplateSchema>;
28
- export type MulmoScriptTemplateFile = z.infer<typeof mulmoScriptTemplateFileSchema>;
27
+ export type MulmoPromptTemplate = z.infer<typeof mulmoPromptTemplateSchema>;
28
+ export type MulmoPromptTemplateFile = z.infer<typeof mulmoPromptTemplateFileSchema>;
29
29
  export type MulmoStudioMultiLingual = z.infer<typeof mulmoStudioMultiLingualSchema>;
30
30
  export type MulmoStudioMultiLingualData = z.infer<typeof mulmoStudioMultiLingualDataSchema>;
31
31
  export type MultiLingualTexts = z.infer<typeof multiLingualTextsSchema>;
@@ -210,12 +210,6 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
210
210
  type: "voice_over";
211
211
  startAt?: number | undefined;
212
212
  } | undefined;
213
- duration?: number | undefined;
214
- speechOptions?: {
215
- speed?: number | undefined;
216
- instruction?: string | undefined;
217
- } | undefined;
218
- id?: string | undefined;
219
213
  audio?: {
220
214
  type: "audio";
221
215
  source: {
@@ -235,6 +229,12 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
235
229
  type: "midi";
236
230
  source: string;
237
231
  } | undefined;
232
+ duration?: number | undefined;
233
+ speechOptions?: {
234
+ speed?: number | undefined;
235
+ instruction?: string | undefined;
236
+ } | undefined;
237
+ id?: string | undefined;
238
238
  imagePrompt?: string | undefined;
239
239
  speaker?: string | undefined;
240
240
  description?: string | undefined;
@@ -1,6 +1,6 @@
1
- import type { MulmoScript, MulmoScriptTemplateFile, MulmoStudioContext } from "../types/index.js";
1
+ import type { MulmoScript, MulmoPromptTemplateFile, MulmoStudioContext } from "../types/index.js";
2
2
  import { PDFMode } from "../types/index.js";
3
- import { ZodSchema, ZodType } from "zod";
3
+ import { ZodSchema } from "zod";
4
4
  export declare const updateNpmRoot: (_npmRoot: string) => void;
5
5
  export declare function readMulmoScriptFile<T = MulmoScript>(path: string, errorMessage: string): {
6
6
  mulmoData: T;
@@ -40,13 +40,8 @@ export declare const defaultBGMPath: () => string;
40
40
  export declare const getHTMLFile: (filename: string) => string;
41
41
  export declare const getBaseDirPath: (basedir?: string) => string;
42
42
  export declare const getFullPath: (baseDirPath: string | undefined, file: string) => string;
43
- export declare const readScriptTemplateFile: (scriptName: string) => any;
44
- export declare const getScriptFromPromptTemplate: (promptTemplateName: string) => any;
45
- export declare const readTemplatePrompt: (promptTemplateName: string) => string;
46
- export declare const getAvailableTemplates: () => MulmoScriptTemplateFile[];
47
- export declare const getAvailablePromptTemplates: () => MulmoScriptTemplateFile[];
48
- export declare const getAvailableScriptTemplates: () => MulmoScriptTemplateFile[];
49
- export declare const getPromptTemplates: <T>(dirPath: string, schema: ZodType) => T[];
43
+ export declare const getAvailablePromptTemplates: (skipValidation?: boolean) => MulmoPromptTemplateFile[];
44
+ export declare const getAvailableScriptTemplates: () => MulmoScript[];
50
45
  export declare const writingMessage: (filePath: string) => void;
51
46
  export declare const readAndParseJson: <S extends ZodSchema<any>>(filePath: string, schema: S) => ReturnType<S["parse"]>;
52
47
  export declare const generateTimestampedFileName: (prefix: string) => string;