mulmocast 1.2.40 → 1.2.41

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.
@@ -288,8 +288,8 @@ export const audio = async (context, args) => {
288
288
  writingMessage(audioArtifactFilePath);
289
289
  return result.combineFiles;
290
290
  }
291
- catch (__error) {
291
+ catch (error) {
292
292
  MulmoStudioContextMethods.setSessionState(context, "audio", false, false);
293
- throw __error;
293
+ throw error;
294
294
  }
295
295
  };
@@ -8,4 +8,4 @@ export declare const getAudioPart: (inputIndex: number, duration: number, delay:
8
8
  audioPart: string;
9
9
  };
10
10
  export declare const movieFilePath: (context: MulmoStudioContext) => string;
11
- export declare const movie: (context: MulmoStudioContext) => Promise<void>;
11
+ export declare const movie: (context: MulmoStudioContext) => Promise<boolean>;
@@ -252,8 +252,10 @@ export const movie = async (context) => {
252
252
  writingMessage(outputVideoPath);
253
253
  }
254
254
  MulmoStudioContextMethods.setSessionState(context, "video", false, true);
255
+ return true;
255
256
  }
256
- catch (__error) {
257
+ catch (error) {
257
258
  MulmoStudioContextMethods.setSessionState(context, "video", false, false);
259
+ throw error;
258
260
  }
259
261
  };
@@ -1127,12 +1127,32 @@ export declare const mulmoGoogleImageModelSchema: z.ZodObject<{
1127
1127
  provider: "google";
1128
1128
  model?: string | undefined;
1129
1129
  }>;
1130
+ export declare const mulmoBeatImageParamsSchema: z.ZodObject<{
1131
+ provider: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
1132
+ model: z.ZodOptional<z.ZodString>;
1133
+ quality: z.ZodOptional<z.ZodString>;
1134
+ style: z.ZodOptional<z.ZodString>;
1135
+ moderation: z.ZodOptional<z.ZodString>;
1136
+ }, "strict", z.ZodTypeAny, {
1137
+ provider?: string | undefined;
1138
+ model?: string | undefined;
1139
+ style?: string | undefined;
1140
+ quality?: string | undefined;
1141
+ moderation?: string | undefined;
1142
+ }, {
1143
+ provider?: string | undefined;
1144
+ model?: string | undefined;
1145
+ style?: string | undefined;
1146
+ quality?: string | undefined;
1147
+ moderation?: string | undefined;
1148
+ }>;
1130
1149
  export declare const mulmoImageParamsSchema: z.ZodObject<{
1131
1150
  provider: z.ZodOptional<z.ZodEnum<[string, ...string[]]>>;
1132
1151
  model: z.ZodOptional<z.ZodString>;
1133
1152
  quality: z.ZodOptional<z.ZodString>;
1134
1153
  style: z.ZodOptional<z.ZodString>;
1135
1154
  moderation: z.ZodOptional<z.ZodString>;
1155
+ } & {
1136
1156
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1137
1157
  type: z.ZodLiteral<"image">;
1138
1158
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -1954,130 +1974,13 @@ export declare const mulmoBeatSchema: z.ZodObject<{
1954
1974
  quality: z.ZodOptional<z.ZodString>;
1955
1975
  style: z.ZodOptional<z.ZodString>;
1956
1976
  moderation: z.ZodOptional<z.ZodString>;
1957
- images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
1958
- type: z.ZodLiteral<"image">;
1959
- source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1960
- kind: z.ZodLiteral<"url">;
1961
- url: z.ZodString;
1962
- }, "strict", z.ZodTypeAny, {
1963
- url: string;
1964
- kind: "url";
1965
- }, {
1966
- url: string;
1967
- kind: "url";
1968
- }>, z.ZodObject<{
1969
- kind: z.ZodLiteral<"base64">;
1970
- data: z.ZodString;
1971
- }, "strict", z.ZodTypeAny, {
1972
- kind: "base64";
1973
- data: string;
1974
- }, {
1975
- kind: "base64";
1976
- data: string;
1977
- }>, z.ZodObject<{
1978
- kind: z.ZodLiteral<"text">;
1979
- text: z.ZodString;
1980
- }, "strict", z.ZodTypeAny, {
1981
- text: string;
1982
- kind: "text";
1983
- }, {
1984
- text: string;
1985
- kind: "text";
1986
- }>, z.ZodObject<{
1987
- kind: z.ZodLiteral<"path">;
1988
- path: z.ZodString;
1989
- }, "strict", z.ZodTypeAny, {
1990
- path: string;
1991
- kind: "path";
1992
- }, {
1993
- path: string;
1994
- kind: "path";
1995
- }>]>;
1996
- }, "strict", z.ZodTypeAny, {
1997
- type: "image";
1998
- source: {
1999
- url: string;
2000
- kind: "url";
2001
- } | {
2002
- kind: "base64";
2003
- data: string;
2004
- } | {
2005
- text: string;
2006
- kind: "text";
2007
- } | {
2008
- path: string;
2009
- kind: "path";
2010
- };
2011
- }, {
2012
- type: "image";
2013
- source: {
2014
- url: string;
2015
- kind: "url";
2016
- } | {
2017
- kind: "base64";
2018
- data: string;
2019
- } | {
2020
- text: string;
2021
- kind: "text";
2022
- } | {
2023
- path: string;
2024
- kind: "path";
2025
- };
2026
- }>, z.ZodObject<{
2027
- type: z.ZodLiteral<"imagePrompt">;
2028
- prompt: z.ZodString;
2029
- }, "strict", z.ZodTypeAny, {
2030
- type: "imagePrompt";
2031
- prompt: string;
2032
- }, {
2033
- type: "imagePrompt";
2034
- prompt: string;
2035
- }>]>>>;
2036
1977
  }, "strict", z.ZodTypeAny, {
2037
- images?: Record<string, {
2038
- type: "image";
2039
- source: {
2040
- url: string;
2041
- kind: "url";
2042
- } | {
2043
- kind: "base64";
2044
- data: string;
2045
- } | {
2046
- text: string;
2047
- kind: "text";
2048
- } | {
2049
- path: string;
2050
- kind: "path";
2051
- };
2052
- } | {
2053
- type: "imagePrompt";
2054
- prompt: string;
2055
- }> | undefined;
2056
1978
  provider?: string | undefined;
2057
1979
  model?: string | undefined;
2058
1980
  style?: string | undefined;
2059
1981
  quality?: string | undefined;
2060
1982
  moderation?: string | undefined;
2061
1983
  }, {
2062
- images?: Record<string, {
2063
- type: "image";
2064
- source: {
2065
- url: string;
2066
- kind: "url";
2067
- } | {
2068
- kind: "base64";
2069
- data: string;
2070
- } | {
2071
- text: string;
2072
- kind: "text";
2073
- } | {
2074
- path: string;
2075
- kind: "path";
2076
- };
2077
- } | {
2078
- type: "imagePrompt";
2079
- prompt: string;
2080
- }> | undefined;
2081
1984
  provider?: string | undefined;
2082
1985
  model?: string | undefined;
2083
1986
  style?: string | undefined;
@@ -2334,25 +2237,6 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2334
2237
  speaker?: string | undefined;
2335
2238
  description?: string | undefined;
2336
2239
  imageParams?: {
2337
- images?: Record<string, {
2338
- type: "image";
2339
- source: {
2340
- url: string;
2341
- kind: "url";
2342
- } | {
2343
- kind: "base64";
2344
- data: string;
2345
- } | {
2346
- text: string;
2347
- kind: "text";
2348
- } | {
2349
- path: string;
2350
- kind: "path";
2351
- };
2352
- } | {
2353
- type: "imagePrompt";
2354
- prompt: string;
2355
- }> | undefined;
2356
2240
  provider?: string | undefined;
2357
2241
  model?: string | undefined;
2358
2242
  style?: string | undefined;
@@ -2538,25 +2422,6 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2538
2422
  speaker?: string | undefined;
2539
2423
  description?: string | undefined;
2540
2424
  imageParams?: {
2541
- images?: Record<string, {
2542
- type: "image";
2543
- source: {
2544
- url: string;
2545
- kind: "url";
2546
- } | {
2547
- kind: "base64";
2548
- data: string;
2549
- } | {
2550
- text: string;
2551
- kind: "text";
2552
- } | {
2553
- path: string;
2554
- kind: "path";
2555
- };
2556
- } | {
2557
- type: "imagePrompt";
2558
- prompt: string;
2559
- }> | undefined;
2560
2425
  provider?: string | undefined;
2561
2426
  model?: string | undefined;
2562
2427
  style?: string | undefined;
@@ -2869,6 +2734,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
2869
2734
  quality: z.ZodOptional<z.ZodString>;
2870
2735
  style: z.ZodOptional<z.ZodString>;
2871
2736
  moderation: z.ZodOptional<z.ZodString>;
2737
+ } & {
2872
2738
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
2873
2739
  type: z.ZodLiteral<"image">;
2874
2740
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -3587,6 +3453,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
3587
3453
  quality: z.ZodOptional<z.ZodString>;
3588
3454
  style: z.ZodOptional<z.ZodString>;
3589
3455
  moderation: z.ZodOptional<z.ZodString>;
3456
+ } & {
3590
3457
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
3591
3458
  type: z.ZodLiteral<"image">;
3592
3459
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -4455,130 +4322,13 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4455
4322
  quality: z.ZodOptional<z.ZodString>;
4456
4323
  style: z.ZodOptional<z.ZodString>;
4457
4324
  moderation: z.ZodOptional<z.ZodString>;
4458
- images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
4459
- type: z.ZodLiteral<"image">;
4460
- source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4461
- kind: z.ZodLiteral<"url">;
4462
- url: z.ZodString;
4463
- }, "strict", z.ZodTypeAny, {
4464
- url: string;
4465
- kind: "url";
4466
- }, {
4467
- url: string;
4468
- kind: "url";
4469
- }>, z.ZodObject<{
4470
- kind: z.ZodLiteral<"base64">;
4471
- data: z.ZodString;
4472
- }, "strict", z.ZodTypeAny, {
4473
- kind: "base64";
4474
- data: string;
4475
- }, {
4476
- kind: "base64";
4477
- data: string;
4478
- }>, z.ZodObject<{
4479
- kind: z.ZodLiteral<"text">;
4480
- text: z.ZodString;
4481
- }, "strict", z.ZodTypeAny, {
4482
- text: string;
4483
- kind: "text";
4484
- }, {
4485
- text: string;
4486
- kind: "text";
4487
- }>, z.ZodObject<{
4488
- kind: z.ZodLiteral<"path">;
4489
- path: z.ZodString;
4490
- }, "strict", z.ZodTypeAny, {
4491
- path: string;
4492
- kind: "path";
4493
- }, {
4494
- path: string;
4495
- kind: "path";
4496
- }>]>;
4497
- }, "strict", z.ZodTypeAny, {
4498
- type: "image";
4499
- source: {
4500
- url: string;
4501
- kind: "url";
4502
- } | {
4503
- kind: "base64";
4504
- data: string;
4505
- } | {
4506
- text: string;
4507
- kind: "text";
4508
- } | {
4509
- path: string;
4510
- kind: "path";
4511
- };
4512
- }, {
4513
- type: "image";
4514
- source: {
4515
- url: string;
4516
- kind: "url";
4517
- } | {
4518
- kind: "base64";
4519
- data: string;
4520
- } | {
4521
- text: string;
4522
- kind: "text";
4523
- } | {
4524
- path: string;
4525
- kind: "path";
4526
- };
4527
- }>, z.ZodObject<{
4528
- type: z.ZodLiteral<"imagePrompt">;
4529
- prompt: z.ZodString;
4530
- }, "strict", z.ZodTypeAny, {
4531
- type: "imagePrompt";
4532
- prompt: string;
4533
- }, {
4534
- type: "imagePrompt";
4535
- prompt: string;
4536
- }>]>>>;
4537
4325
  }, "strict", z.ZodTypeAny, {
4538
- images?: Record<string, {
4539
- type: "image";
4540
- source: {
4541
- url: string;
4542
- kind: "url";
4543
- } | {
4544
- kind: "base64";
4545
- data: string;
4546
- } | {
4547
- text: string;
4548
- kind: "text";
4549
- } | {
4550
- path: string;
4551
- kind: "path";
4552
- };
4553
- } | {
4554
- type: "imagePrompt";
4555
- prompt: string;
4556
- }> | undefined;
4557
4326
  provider?: string | undefined;
4558
4327
  model?: string | undefined;
4559
4328
  style?: string | undefined;
4560
4329
  quality?: string | undefined;
4561
4330
  moderation?: string | undefined;
4562
4331
  }, {
4563
- images?: Record<string, {
4564
- type: "image";
4565
- source: {
4566
- url: string;
4567
- kind: "url";
4568
- } | {
4569
- kind: "base64";
4570
- data: string;
4571
- } | {
4572
- text: string;
4573
- kind: "text";
4574
- } | {
4575
- path: string;
4576
- kind: "path";
4577
- };
4578
- } | {
4579
- type: "imagePrompt";
4580
- prompt: string;
4581
- }> | undefined;
4582
4332
  provider?: string | undefined;
4583
4333
  model?: string | undefined;
4584
4334
  style?: string | undefined;
@@ -4835,25 +4585,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4835
4585
  speaker?: string | undefined;
4836
4586
  description?: string | undefined;
4837
4587
  imageParams?: {
4838
- images?: Record<string, {
4839
- type: "image";
4840
- source: {
4841
- url: string;
4842
- kind: "url";
4843
- } | {
4844
- kind: "base64";
4845
- data: string;
4846
- } | {
4847
- text: string;
4848
- kind: "text";
4849
- } | {
4850
- path: string;
4851
- kind: "path";
4852
- };
4853
- } | {
4854
- type: "imagePrompt";
4855
- prompt: string;
4856
- }> | undefined;
4857
4588
  provider?: string | undefined;
4858
4589
  model?: string | undefined;
4859
4590
  style?: string | undefined;
@@ -5039,25 +4770,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5039
4770
  speaker?: string | undefined;
5040
4771
  description?: string | undefined;
5041
4772
  imageParams?: {
5042
- images?: Record<string, {
5043
- type: "image";
5044
- source: {
5045
- url: string;
5046
- kind: "url";
5047
- } | {
5048
- kind: "base64";
5049
- data: string;
5050
- } | {
5051
- text: string;
5052
- kind: "text";
5053
- } | {
5054
- path: string;
5055
- kind: "path";
5056
- };
5057
- } | {
5058
- type: "imagePrompt";
5059
- prompt: string;
5060
- }> | undefined;
5061
4773
  provider?: string | undefined;
5062
4774
  model?: string | undefined;
5063
4775
  style?: string | undefined;
@@ -5332,25 +5044,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5332
5044
  speaker?: string | undefined;
5333
5045
  description?: string | undefined;
5334
5046
  imageParams?: {
5335
- images?: Record<string, {
5336
- type: "image";
5337
- source: {
5338
- url: string;
5339
- kind: "url";
5340
- } | {
5341
- kind: "base64";
5342
- data: string;
5343
- } | {
5344
- text: string;
5345
- kind: "text";
5346
- } | {
5347
- path: string;
5348
- kind: "path";
5349
- };
5350
- } | {
5351
- type: "imagePrompt";
5352
- prompt: string;
5353
- }> | undefined;
5354
5047
  provider?: string | undefined;
5355
5048
  model?: string | undefined;
5356
5049
  style?: string | undefined;
@@ -5579,25 +5272,6 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5579
5272
  speaker?: string | undefined;
5580
5273
  description?: string | undefined;
5581
5274
  imageParams?: {
5582
- images?: Record<string, {
5583
- type: "image";
5584
- source: {
5585
- url: string;
5586
- kind: "url";
5587
- } | {
5588
- kind: "base64";
5589
- data: string;
5590
- } | {
5591
- text: string;
5592
- kind: "text";
5593
- } | {
5594
- path: string;
5595
- kind: "path";
5596
- };
5597
- } | {
5598
- type: "imagePrompt";
5599
- prompt: string;
5600
- }> | undefined;
5601
5275
  provider?: string | undefined;
5602
5276
  model?: string | undefined;
5603
5277
  style?: string | undefined;
@@ -6304,6 +5978,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6304
5978
  quality: z.ZodOptional<z.ZodString>;
6305
5979
  style: z.ZodOptional<z.ZodString>;
6306
5980
  moderation: z.ZodOptional<z.ZodString>;
5981
+ } & {
6307
5982
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
6308
5983
  type: z.ZodLiteral<"image">;
6309
5984
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -7172,130 +6847,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7172
6847
  quality: z.ZodOptional<z.ZodString>;
7173
6848
  style: z.ZodOptional<z.ZodString>;
7174
6849
  moderation: z.ZodOptional<z.ZodString>;
7175
- images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
7176
- type: z.ZodLiteral<"image">;
7177
- source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
7178
- kind: z.ZodLiteral<"url">;
7179
- url: z.ZodString;
7180
- }, "strict", z.ZodTypeAny, {
7181
- url: string;
7182
- kind: "url";
7183
- }, {
7184
- url: string;
7185
- kind: "url";
7186
- }>, z.ZodObject<{
7187
- kind: z.ZodLiteral<"base64">;
7188
- data: z.ZodString;
7189
- }, "strict", z.ZodTypeAny, {
7190
- kind: "base64";
7191
- data: string;
7192
- }, {
7193
- kind: "base64";
7194
- data: string;
7195
- }>, z.ZodObject<{
7196
- kind: z.ZodLiteral<"text">;
7197
- text: z.ZodString;
7198
- }, "strict", z.ZodTypeAny, {
7199
- text: string;
7200
- kind: "text";
7201
- }, {
7202
- text: string;
7203
- kind: "text";
7204
- }>, z.ZodObject<{
7205
- kind: z.ZodLiteral<"path">;
7206
- path: z.ZodString;
7207
- }, "strict", z.ZodTypeAny, {
7208
- path: string;
7209
- kind: "path";
7210
- }, {
7211
- path: string;
7212
- kind: "path";
7213
- }>]>;
7214
- }, "strict", z.ZodTypeAny, {
7215
- type: "image";
7216
- source: {
7217
- url: string;
7218
- kind: "url";
7219
- } | {
7220
- kind: "base64";
7221
- data: string;
7222
- } | {
7223
- text: string;
7224
- kind: "text";
7225
- } | {
7226
- path: string;
7227
- kind: "path";
7228
- };
7229
- }, {
7230
- type: "image";
7231
- source: {
7232
- url: string;
7233
- kind: "url";
7234
- } | {
7235
- kind: "base64";
7236
- data: string;
7237
- } | {
7238
- text: string;
7239
- kind: "text";
7240
- } | {
7241
- path: string;
7242
- kind: "path";
7243
- };
7244
- }>, z.ZodObject<{
7245
- type: z.ZodLiteral<"imagePrompt">;
7246
- prompt: z.ZodString;
7247
- }, "strict", z.ZodTypeAny, {
7248
- type: "imagePrompt";
7249
- prompt: string;
7250
- }, {
7251
- type: "imagePrompt";
7252
- prompt: string;
7253
- }>]>>>;
7254
6850
  }, "strict", z.ZodTypeAny, {
7255
- images?: Record<string, {
7256
- type: "image";
7257
- source: {
7258
- url: string;
7259
- kind: "url";
7260
- } | {
7261
- kind: "base64";
7262
- data: string;
7263
- } | {
7264
- text: string;
7265
- kind: "text";
7266
- } | {
7267
- path: string;
7268
- kind: "path";
7269
- };
7270
- } | {
7271
- type: "imagePrompt";
7272
- prompt: string;
7273
- }> | undefined;
7274
6851
  provider?: string | undefined;
7275
6852
  model?: string | undefined;
7276
6853
  style?: string | undefined;
7277
6854
  quality?: string | undefined;
7278
6855
  moderation?: string | undefined;
7279
6856
  }, {
7280
- images?: Record<string, {
7281
- type: "image";
7282
- source: {
7283
- url: string;
7284
- kind: "url";
7285
- } | {
7286
- kind: "base64";
7287
- data: string;
7288
- } | {
7289
- text: string;
7290
- kind: "text";
7291
- } | {
7292
- path: string;
7293
- kind: "path";
7294
- };
7295
- } | {
7296
- type: "imagePrompt";
7297
- prompt: string;
7298
- }> | undefined;
7299
6857
  provider?: string | undefined;
7300
6858
  model?: string | undefined;
7301
6859
  style?: string | undefined;
@@ -7552,25 +7110,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7552
7110
  speaker?: string | undefined;
7553
7111
  description?: string | undefined;
7554
7112
  imageParams?: {
7555
- images?: Record<string, {
7556
- type: "image";
7557
- source: {
7558
- url: string;
7559
- kind: "url";
7560
- } | {
7561
- kind: "base64";
7562
- data: string;
7563
- } | {
7564
- text: string;
7565
- kind: "text";
7566
- } | {
7567
- path: string;
7568
- kind: "path";
7569
- };
7570
- } | {
7571
- type: "imagePrompt";
7572
- prompt: string;
7573
- }> | undefined;
7574
7113
  provider?: string | undefined;
7575
7114
  model?: string | undefined;
7576
7115
  style?: string | undefined;
@@ -7756,25 +7295,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7756
7295
  speaker?: string | undefined;
7757
7296
  description?: string | undefined;
7758
7297
  imageParams?: {
7759
- images?: Record<string, {
7760
- type: "image";
7761
- source: {
7762
- url: string;
7763
- kind: "url";
7764
- } | {
7765
- kind: "base64";
7766
- data: string;
7767
- } | {
7768
- text: string;
7769
- kind: "text";
7770
- } | {
7771
- path: string;
7772
- kind: "path";
7773
- };
7774
- } | {
7775
- type: "imagePrompt";
7776
- prompt: string;
7777
- }> | undefined;
7778
7298
  provider?: string | undefined;
7779
7299
  model?: string | undefined;
7780
7300
  style?: string | undefined;
@@ -8049,25 +7569,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8049
7569
  speaker?: string | undefined;
8050
7570
  description?: string | undefined;
8051
7571
  imageParams?: {
8052
- images?: Record<string, {
8053
- type: "image";
8054
- source: {
8055
- url: string;
8056
- kind: "url";
8057
- } | {
8058
- kind: "base64";
8059
- data: string;
8060
- } | {
8061
- text: string;
8062
- kind: "text";
8063
- } | {
8064
- path: string;
8065
- kind: "path";
8066
- };
8067
- } | {
8068
- type: "imagePrompt";
8069
- prompt: string;
8070
- }> | undefined;
8071
7572
  provider?: string | undefined;
8072
7573
  model?: string | undefined;
8073
7574
  style?: string | undefined;
@@ -8296,25 +7797,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8296
7797
  speaker?: string | undefined;
8297
7798
  description?: string | undefined;
8298
7799
  imageParams?: {
8299
- images?: Record<string, {
8300
- type: "image";
8301
- source: {
8302
- url: string;
8303
- kind: "url";
8304
- } | {
8305
- kind: "base64";
8306
- data: string;
8307
- } | {
8308
- text: string;
8309
- kind: "text";
8310
- } | {
8311
- path: string;
8312
- kind: "path";
8313
- };
8314
- } | {
8315
- type: "imagePrompt";
8316
- prompt: string;
8317
- }> | undefined;
8318
7800
  provider?: string | undefined;
8319
7801
  model?: string | undefined;
8320
7802
  style?: string | undefined;
@@ -8780,25 +8262,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
8780
8262
  speaker?: string | undefined;
8781
8263
  description?: string | undefined;
8782
8264
  imageParams?: {
8783
- images?: Record<string, {
8784
- type: "image";
8785
- source: {
8786
- url: string;
8787
- kind: "url";
8788
- } | {
8789
- kind: "base64";
8790
- data: string;
8791
- } | {
8792
- text: string;
8793
- kind: "text";
8794
- } | {
8795
- path: string;
8796
- kind: "path";
8797
- };
8798
- } | {
8799
- type: "imagePrompt";
8800
- prompt: string;
8801
- }> | undefined;
8802
8265
  provider?: string | undefined;
8803
8266
  model?: string | undefined;
8804
8267
  style?: string | undefined;
@@ -9049,25 +8512,6 @@ export declare const mulmoStudioSchema: z.ZodObject<{
9049
8512
  speaker?: string | undefined;
9050
8513
  description?: string | undefined;
9051
8514
  imageParams?: {
9052
- images?: Record<string, {
9053
- type: "image";
9054
- source: {
9055
- url: string;
9056
- kind: "url";
9057
- } | {
9058
- kind: "base64";
9059
- data: string;
9060
- } | {
9061
- text: string;
9062
- kind: "text";
9063
- } | {
9064
- path: string;
9065
- kind: "path";
9066
- };
9067
- } | {
9068
- type: "imagePrompt";
9069
- prompt: string;
9070
- }> | undefined;
9071
8515
  provider?: string | undefined;
9072
8516
  model?: string | undefined;
9073
8517
  style?: string | undefined;
@@ -9411,6 +8855,7 @@ export declare const mulmoPromptTemplateSchema: z.ZodObject<{
9411
8855
  quality: z.ZodOptional<z.ZodString>;
9412
8856
  style: z.ZodOptional<z.ZodString>;
9413
8857
  moderation: z.ZodOptional<z.ZodString>;
8858
+ } & {
9414
8859
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
9415
8860
  type: z.ZodLiteral<"image">;
9416
8861
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -10353,6 +9798,7 @@ export declare const mulmoPromptTemplateFileSchema: z.ZodObject<{
10353
9798
  quality: z.ZodOptional<z.ZodString>;
10354
9799
  style: z.ZodOptional<z.ZodString>;
10355
9800
  moderation: z.ZodOptional<z.ZodString>;
9801
+ } & {
10356
9802
  images: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
10357
9803
  type: z.ZodLiteral<"image">;
10358
9804
  source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
@@ -194,13 +194,17 @@ export const mulmoGoogleImageModelSchema = z
194
194
  model: z.enum(provider2ImageAgent["google"].models).optional(),
195
195
  })
196
196
  .strict();
197
- export const mulmoImageParamsSchema = z
197
+ export const mulmoBeatImageParamsSchema = z
198
198
  .object({
199
199
  provider: text2ImageProviderSchema, // has no default value (do not change it)
200
200
  model: z.string().optional(), // default: provider specific
201
201
  quality: z.string().optional(), // optional image quality (model specific)
202
202
  style: z.string().optional(), // optional image style
203
203
  moderation: z.string().optional(), // optional image style
204
+ })
205
+ .strict();
206
+ export const mulmoImageParamsSchema = mulmoBeatImageParamsSchema
207
+ .extend({
204
208
  images: mulmoImageParamsImagesSchema.optional(),
205
209
  })
206
210
  .strict();
@@ -260,7 +264,7 @@ export const mulmoBeatSchema = z
260
264
  image: mulmoImageAssetSchema.optional(),
261
265
  audio: mulmoAudioAssetSchema.optional(),
262
266
  duration: z.number().optional().describe("Duration of the beat. Used only when the text is empty"),
263
- imageParams: mulmoImageParamsSchema.optional(), // beat specific parameters
267
+ imageParams: mulmoBeatImageParamsSchema.optional(), // beat specific parameters
264
268
  audioParams: beatAudioParamsSchema.optional(), // beat specific parameters
265
269
  movieParams: z
266
270
  .object({
@@ -244,25 +244,6 @@ export declare const createStudioData: (_mulmoScript: MulmoScript, fileName: str
244
244
  speaker?: string | undefined;
245
245
  description?: string | undefined;
246
246
  imageParams?: {
247
- images?: Record<string, {
248
- type: "image";
249
- source: {
250
- url: string;
251
- kind: "url";
252
- } | {
253
- kind: "base64";
254
- data: string;
255
- } | {
256
- text: string;
257
- kind: "text";
258
- } | {
259
- path: string;
260
- kind: "path";
261
- };
262
- } | {
263
- type: "imagePrompt";
264
- prompt: string;
265
- }> | undefined;
266
247
  provider?: string | undefined;
267
248
  model?: string | undefined;
268
249
  style?: string | undefined;
@@ -598,25 +579,6 @@ export declare const initializeContextFromFiles: (files: FileObject, raiseError:
598
579
  speaker?: string | undefined;
599
580
  description?: string | undefined;
600
581
  imageParams?: {
601
- images?: Record<string, {
602
- type: "image";
603
- source: {
604
- url: string;
605
- kind: "url";
606
- } | {
607
- kind: "base64";
608
- data: string;
609
- } | {
610
- text: string;
611
- kind: "text";
612
- } | {
613
- path: string;
614
- kind: "path";
615
- };
616
- } | {
617
- type: "imagePrompt";
618
- prompt: string;
619
- }> | undefined;
620
582
  provider?: string | undefined;
621
583
  model?: string | undefined;
622
584
  style?: string | undefined;
package/lib/utils/file.js CHANGED
@@ -199,7 +199,9 @@ const getPromptTemplates = (dirPath, schema) => {
199
199
  return [];
200
200
  }
201
201
  const files = fs.readdirSync(templatesDir);
202
- return files.map((file) => {
202
+ return files
203
+ .filter((file) => file.endsWith(".json"))
204
+ .map((file) => {
203
205
  try {
204
206
  const promptTemplate = JSON.parse(fs.readFileSync(path.resolve(templatesDir, file), "utf-8"));
205
207
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "1.2.40",
3
+ "version": "1.2.41",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.node.js",