mulmocast 2.0.0-alpha.1 → 2.0.0

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.
@@ -1,9 +1,8 @@
1
1
  import { type AgentFunction, type AgentFunctionInfo, type DefaultConfigData } from "graphai";
2
- import { MulmoScript } from "../types/index.js";
3
- import { ZodSchema } from "zod";
2
+ import { type MulmoScript, mulmoScriptSchema } from "../types/index.js";
4
3
  interface ValidateMulmoScriptInputs {
5
4
  text: string;
6
- schema: ZodSchema;
5
+ schema: typeof mulmoScriptSchema;
7
6
  }
8
7
  interface ValidateMulmoScriptResponse {
9
8
  isValid: boolean;
@@ -119,7 +119,7 @@ export declare const mulmoSpeechParamsSchema: z.ZodDefault<z.ZodObject<{
119
119
  }, z.core.$strip>>;
120
120
  export declare const mediaSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
121
121
  kind: z.ZodLiteral<"url">;
122
- url: z.ZodString;
122
+ url: z.ZodURL;
123
123
  }, z.core.$strict>, z.ZodObject<{
124
124
  kind: z.ZodLiteral<"base64">;
125
125
  data: z.ZodString;
@@ -129,7 +129,7 @@ export declare const mediaSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
129
129
  }, z.core.$strict>], "kind">;
130
130
  export declare const mediaSourceMermaidSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
131
131
  kind: z.ZodLiteral<"url">;
132
- url: z.ZodString;
132
+ url: z.ZodURL;
133
133
  }, z.core.$strict>, z.ZodObject<{
134
134
  kind: z.ZodLiteral<"base64">;
135
135
  data: z.ZodString;
@@ -148,7 +148,7 @@ export declare const mulmoImageMediaSchema: z.ZodObject<{
148
148
  type: z.ZodLiteral<"image">;
149
149
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
150
150
  kind: z.ZodLiteral<"url">;
151
- url: z.ZodString;
151
+ url: z.ZodURL;
152
152
  }, z.core.$strict>, z.ZodObject<{
153
153
  kind: z.ZodLiteral<"base64">;
154
154
  data: z.ZodString;
@@ -179,7 +179,7 @@ export declare const mulmoMermaidMediaSchema: z.ZodObject<{
179
179
  title: z.ZodString;
180
180
  code: z.ZodDiscriminatedUnion<[z.ZodObject<{
181
181
  kind: z.ZodLiteral<"url">;
182
- url: z.ZodString;
182
+ url: z.ZodURL;
183
183
  }, z.core.$strict>, z.ZodObject<{
184
184
  kind: z.ZodLiteral<"base64">;
185
185
  data: z.ZodString;
@@ -214,12 +214,12 @@ export declare const mulmoImageAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
214
214
  markdown: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
215
215
  }, z.core.$strict>, z.ZodObject<{
216
216
  type: z.ZodLiteral<"web">;
217
- url: z.ZodString;
217
+ url: z.ZodURL;
218
218
  }, z.core.$strict>, z.ZodObject<{
219
219
  type: z.ZodLiteral<"pdf">;
220
220
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
221
221
  kind: z.ZodLiteral<"url">;
222
- url: z.ZodString;
222
+ url: z.ZodURL;
223
223
  }, z.core.$strict>, z.ZodObject<{
224
224
  kind: z.ZodLiteral<"base64">;
225
225
  data: z.ZodString;
@@ -231,7 +231,7 @@ export declare const mulmoImageAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
231
231
  type: z.ZodLiteral<"image">;
232
232
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
233
233
  kind: z.ZodLiteral<"url">;
234
- url: z.ZodString;
234
+ url: z.ZodURL;
235
235
  }, z.core.$strict>, z.ZodObject<{
236
236
  kind: z.ZodLiteral<"base64">;
237
237
  data: z.ZodString;
@@ -243,7 +243,7 @@ export declare const mulmoImageAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
243
243
  type: z.ZodLiteral<"svg">;
244
244
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
245
245
  kind: z.ZodLiteral<"url">;
246
- url: z.ZodString;
246
+ url: z.ZodURL;
247
247
  }, z.core.$strict>, z.ZodObject<{
248
248
  kind: z.ZodLiteral<"base64">;
249
249
  data: z.ZodString;
@@ -255,7 +255,7 @@ export declare const mulmoImageAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
255
255
  type: z.ZodLiteral<"movie">;
256
256
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
257
257
  kind: z.ZodLiteral<"url">;
258
- url: z.ZodString;
258
+ url: z.ZodURL;
259
259
  }, z.core.$strict>, z.ZodObject<{
260
260
  kind: z.ZodLiteral<"base64">;
261
261
  data: z.ZodString;
@@ -279,7 +279,7 @@ export declare const mulmoImageAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
279
279
  title: z.ZodString;
280
280
  code: z.ZodDiscriminatedUnion<[z.ZodObject<{
281
281
  kind: z.ZodLiteral<"url">;
282
- url: z.ZodString;
282
+ url: z.ZodURL;
283
283
  }, z.core.$strict>, z.ZodObject<{
284
284
  kind: z.ZodLiteral<"base64">;
285
285
  data: z.ZodString;
@@ -309,7 +309,7 @@ export declare const mulmoAudioAssetSchema: z.ZodUnion<readonly [z.ZodObject<{
309
309
  type: z.ZodLiteral<"audio">;
310
310
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
311
311
  kind: z.ZodLiteral<"url">;
312
- url: z.ZodString;
312
+ url: z.ZodURL;
313
313
  }, z.core.$strict>, z.ZodObject<{
314
314
  kind: z.ZodLiteral<"base64">;
315
315
  data: z.ZodString;
@@ -329,7 +329,7 @@ export declare const mulmoImageParamsImagesValueSchema: z.ZodUnion<readonly [z.Z
329
329
  type: z.ZodLiteral<"image">;
330
330
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
331
331
  kind: z.ZodLiteral<"url">;
332
- url: z.ZodString;
332
+ url: z.ZodURL;
333
333
  }, z.core.$strict>, z.ZodObject<{
334
334
  kind: z.ZodLiteral<"base64">;
335
335
  data: z.ZodString;
@@ -345,7 +345,7 @@ export declare const mulmoImageParamsImagesSchema: z.ZodRecord<z.ZodString, z.Zo
345
345
  type: z.ZodLiteral<"image">;
346
346
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
347
347
  kind: z.ZodLiteral<"url">;
348
- url: z.ZodString;
348
+ url: z.ZodURL;
349
349
  }, z.core.$strict>, z.ZodObject<{
350
350
  kind: z.ZodLiteral<"base64">;
351
351
  data: z.ZodString;
@@ -405,7 +405,7 @@ export declare const mulmoImageParamsSchema: z.ZodObject<{
405
405
  type: z.ZodLiteral<"image">;
406
406
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
407
407
  kind: z.ZodLiteral<"url">;
408
- url: z.ZodString;
408
+ url: z.ZodURL;
409
409
  }, z.core.$strict>, z.ZodObject<{
410
410
  kind: z.ZodLiteral<"base64">;
411
411
  data: z.ZodString;
@@ -435,7 +435,7 @@ export declare const audioParamsSchema: z.ZodObject<{
435
435
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
436
436
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
437
437
  kind: z.ZodLiteral<"url">;
438
- url: z.ZodString;
438
+ url: z.ZodURL;
439
439
  }, z.core.$strict>, z.ZodObject<{
440
440
  kind: z.ZodLiteral<"base64">;
441
441
  data: z.ZodString;
@@ -479,12 +479,12 @@ export declare const mulmoBeatSchema: z.ZodObject<{
479
479
  markdown: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
480
480
  }, z.core.$strict>, z.ZodObject<{
481
481
  type: z.ZodLiteral<"web">;
482
- url: z.ZodString;
482
+ url: z.ZodURL;
483
483
  }, z.core.$strict>, z.ZodObject<{
484
484
  type: z.ZodLiteral<"pdf">;
485
485
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
486
486
  kind: z.ZodLiteral<"url">;
487
- url: z.ZodString;
487
+ url: z.ZodURL;
488
488
  }, z.core.$strict>, z.ZodObject<{
489
489
  kind: z.ZodLiteral<"base64">;
490
490
  data: z.ZodString;
@@ -496,7 +496,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
496
496
  type: z.ZodLiteral<"image">;
497
497
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
498
498
  kind: z.ZodLiteral<"url">;
499
- url: z.ZodString;
499
+ url: z.ZodURL;
500
500
  }, z.core.$strict>, z.ZodObject<{
501
501
  kind: z.ZodLiteral<"base64">;
502
502
  data: z.ZodString;
@@ -508,7 +508,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
508
508
  type: z.ZodLiteral<"svg">;
509
509
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
510
510
  kind: z.ZodLiteral<"url">;
511
- url: z.ZodString;
511
+ url: z.ZodURL;
512
512
  }, z.core.$strict>, z.ZodObject<{
513
513
  kind: z.ZodLiteral<"base64">;
514
514
  data: z.ZodString;
@@ -520,7 +520,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
520
520
  type: z.ZodLiteral<"movie">;
521
521
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
522
522
  kind: z.ZodLiteral<"url">;
523
- url: z.ZodString;
523
+ url: z.ZodURL;
524
524
  }, z.core.$strict>, z.ZodObject<{
525
525
  kind: z.ZodLiteral<"base64">;
526
526
  data: z.ZodString;
@@ -544,7 +544,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
544
544
  title: z.ZodString;
545
545
  code: z.ZodDiscriminatedUnion<[z.ZodObject<{
546
546
  kind: z.ZodLiteral<"url">;
547
- url: z.ZodString;
547
+ url: z.ZodURL;
548
548
  }, z.core.$strict>, z.ZodObject<{
549
549
  kind: z.ZodLiteral<"base64">;
550
550
  data: z.ZodString;
@@ -574,7 +574,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
574
574
  type: z.ZodLiteral<"audio">;
575
575
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
576
576
  kind: z.ZodLiteral<"url">;
577
- url: z.ZodString;
577
+ url: z.ZodURL;
578
578
  }, z.core.$strict>, z.ZodObject<{
579
579
  kind: z.ZodLiteral<"base64">;
580
580
  data: z.ZodString;
@@ -748,7 +748,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
748
748
  type: z.ZodLiteral<"image">;
749
749
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
750
750
  kind: z.ZodLiteral<"url">;
751
- url: z.ZodString;
751
+ url: z.ZodURL;
752
752
  }, z.core.$strict>, z.ZodObject<{
753
753
  kind: z.ZodLiteral<"base64">;
754
754
  data: z.ZodString;
@@ -810,7 +810,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
810
810
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
811
811
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
812
812
  kind: z.ZodLiteral<"url">;
813
- url: z.ZodString;
813
+ url: z.ZodURL;
814
814
  }, z.core.$strict>, z.ZodObject<{
815
815
  kind: z.ZodLiteral<"base64">;
816
816
  data: z.ZodString;
@@ -824,7 +824,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
824
824
  }, z.core.$strict>>;
825
825
  }, z.core.$strip>;
826
826
  export declare const mulmoReferenceSchema: z.ZodObject<{
827
- url: z.ZodString;
827
+ url: z.ZodURL;
828
828
  title: z.ZodOptional<z.ZodString>;
829
829
  description: z.ZodOptional<z.ZodString>;
830
830
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -884,7 +884,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
884
884
  type: z.ZodLiteral<"image">;
885
885
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
886
886
  kind: z.ZodLiteral<"url">;
887
- url: z.ZodString;
887
+ url: z.ZodURL;
888
888
  }, z.core.$strict>, z.ZodObject<{
889
889
  kind: z.ZodLiteral<"base64">;
890
890
  data: z.ZodString;
@@ -946,7 +946,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
946
946
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
947
947
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
948
948
  kind: z.ZodLiteral<"url">;
949
- url: z.ZodString;
949
+ url: z.ZodURL;
950
950
  }, z.core.$strict>, z.ZodObject<{
951
951
  kind: z.ZodLiteral<"base64">;
952
952
  data: z.ZodString;
@@ -961,7 +961,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
961
961
  title: z.ZodOptional<z.ZodString>;
962
962
  description: z.ZodOptional<z.ZodString>;
963
963
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
964
- url: z.ZodString;
964
+ url: z.ZodURL;
965
965
  title: z.ZodOptional<z.ZodString>;
966
966
  description: z.ZodOptional<z.ZodString>;
967
967
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -983,12 +983,12 @@ export declare const mulmoScriptSchema: z.ZodObject<{
983
983
  markdown: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
984
984
  }, z.core.$strict>, z.ZodObject<{
985
985
  type: z.ZodLiteral<"web">;
986
- url: z.ZodString;
986
+ url: z.ZodURL;
987
987
  }, z.core.$strict>, z.ZodObject<{
988
988
  type: z.ZodLiteral<"pdf">;
989
989
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
990
990
  kind: z.ZodLiteral<"url">;
991
- url: z.ZodString;
991
+ url: z.ZodURL;
992
992
  }, z.core.$strict>, z.ZodObject<{
993
993
  kind: z.ZodLiteral<"base64">;
994
994
  data: z.ZodString;
@@ -1000,7 +1000,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
1000
1000
  type: z.ZodLiteral<"image">;
1001
1001
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1002
1002
  kind: z.ZodLiteral<"url">;
1003
- url: z.ZodString;
1003
+ url: z.ZodURL;
1004
1004
  }, z.core.$strict>, z.ZodObject<{
1005
1005
  kind: z.ZodLiteral<"base64">;
1006
1006
  data: z.ZodString;
@@ -1012,7 +1012,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
1012
1012
  type: z.ZodLiteral<"svg">;
1013
1013
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1014
1014
  kind: z.ZodLiteral<"url">;
1015
- url: z.ZodString;
1015
+ url: z.ZodURL;
1016
1016
  }, z.core.$strict>, z.ZodObject<{
1017
1017
  kind: z.ZodLiteral<"base64">;
1018
1018
  data: z.ZodString;
@@ -1024,7 +1024,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
1024
1024
  type: z.ZodLiteral<"movie">;
1025
1025
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1026
1026
  kind: z.ZodLiteral<"url">;
1027
- url: z.ZodString;
1027
+ url: z.ZodURL;
1028
1028
  }, z.core.$strict>, z.ZodObject<{
1029
1029
  kind: z.ZodLiteral<"base64">;
1030
1030
  data: z.ZodString;
@@ -1048,7 +1048,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
1048
1048
  title: z.ZodString;
1049
1049
  code: z.ZodDiscriminatedUnion<[z.ZodObject<{
1050
1050
  kind: z.ZodLiteral<"url">;
1051
- url: z.ZodString;
1051
+ url: z.ZodURL;
1052
1052
  }, z.core.$strict>, z.ZodObject<{
1053
1053
  kind: z.ZodLiteral<"base64">;
1054
1054
  data: z.ZodString;
@@ -1078,7 +1078,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
1078
1078
  type: z.ZodLiteral<"audio">;
1079
1079
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1080
1080
  kind: z.ZodLiteral<"url">;
1081
- url: z.ZodString;
1081
+ url: z.ZodURL;
1082
1082
  }, z.core.$strict>, z.ZodObject<{
1083
1083
  kind: z.ZodLiteral<"base64">;
1084
1084
  data: z.ZodString;
@@ -1296,7 +1296,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1296
1296
  type: z.ZodLiteral<"image">;
1297
1297
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1298
1298
  kind: z.ZodLiteral<"url">;
1299
- url: z.ZodString;
1299
+ url: z.ZodURL;
1300
1300
  }, z.core.$strict>, z.ZodObject<{
1301
1301
  kind: z.ZodLiteral<"base64">;
1302
1302
  data: z.ZodString;
@@ -1358,7 +1358,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1358
1358
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1359
1359
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1360
1360
  kind: z.ZodLiteral<"url">;
1361
- url: z.ZodString;
1361
+ url: z.ZodURL;
1362
1362
  }, z.core.$strict>, z.ZodObject<{
1363
1363
  kind: z.ZodLiteral<"base64">;
1364
1364
  data: z.ZodString;
@@ -1373,7 +1373,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1373
1373
  title: z.ZodOptional<z.ZodString>;
1374
1374
  description: z.ZodOptional<z.ZodString>;
1375
1375
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
1376
- url: z.ZodString;
1376
+ url: z.ZodURL;
1377
1377
  title: z.ZodOptional<z.ZodString>;
1378
1378
  description: z.ZodOptional<z.ZodString>;
1379
1379
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1395,12 +1395,12 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1395
1395
  markdown: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
1396
1396
  }, z.core.$strict>, z.ZodObject<{
1397
1397
  type: z.ZodLiteral<"web">;
1398
- url: z.ZodString;
1398
+ url: z.ZodURL;
1399
1399
  }, z.core.$strict>, z.ZodObject<{
1400
1400
  type: z.ZodLiteral<"pdf">;
1401
1401
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1402
1402
  kind: z.ZodLiteral<"url">;
1403
- url: z.ZodString;
1403
+ url: z.ZodURL;
1404
1404
  }, z.core.$strict>, z.ZodObject<{
1405
1405
  kind: z.ZodLiteral<"base64">;
1406
1406
  data: z.ZodString;
@@ -1412,7 +1412,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1412
1412
  type: z.ZodLiteral<"image">;
1413
1413
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1414
1414
  kind: z.ZodLiteral<"url">;
1415
- url: z.ZodString;
1415
+ url: z.ZodURL;
1416
1416
  }, z.core.$strict>, z.ZodObject<{
1417
1417
  kind: z.ZodLiteral<"base64">;
1418
1418
  data: z.ZodString;
@@ -1424,7 +1424,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1424
1424
  type: z.ZodLiteral<"svg">;
1425
1425
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1426
1426
  kind: z.ZodLiteral<"url">;
1427
- url: z.ZodString;
1427
+ url: z.ZodURL;
1428
1428
  }, z.core.$strict>, z.ZodObject<{
1429
1429
  kind: z.ZodLiteral<"base64">;
1430
1430
  data: z.ZodString;
@@ -1436,7 +1436,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1436
1436
  type: z.ZodLiteral<"movie">;
1437
1437
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1438
1438
  kind: z.ZodLiteral<"url">;
1439
- url: z.ZodString;
1439
+ url: z.ZodURL;
1440
1440
  }, z.core.$strict>, z.ZodObject<{
1441
1441
  kind: z.ZodLiteral<"base64">;
1442
1442
  data: z.ZodString;
@@ -1460,7 +1460,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1460
1460
  title: z.ZodString;
1461
1461
  code: z.ZodDiscriminatedUnion<[z.ZodObject<{
1462
1462
  kind: z.ZodLiteral<"url">;
1463
- url: z.ZodString;
1463
+ url: z.ZodURL;
1464
1464
  }, z.core.$strict>, z.ZodObject<{
1465
1465
  kind: z.ZodLiteral<"base64">;
1466
1466
  data: z.ZodString;
@@ -1490,7 +1490,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
1490
1490
  type: z.ZodLiteral<"audio">;
1491
1491
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1492
1492
  kind: z.ZodLiteral<"url">;
1493
- url: z.ZodString;
1493
+ url: z.ZodURL;
1494
1494
  }, z.core.$strict>, z.ZodObject<{
1495
1495
  kind: z.ZodLiteral<"base64">;
1496
1496
  data: z.ZodString;
@@ -1644,7 +1644,7 @@ export declare const mulmoPromptTemplateSchema: z.ZodObject<{
1644
1644
  type: z.ZodLiteral<"image">;
1645
1645
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1646
1646
  kind: z.ZodLiteral<"url">;
1647
- url: z.ZodString;
1647
+ url: z.ZodURL;
1648
1648
  }, z.core.$strict>, z.ZodObject<{
1649
1649
  kind: z.ZodLiteral<"base64">;
1650
1650
  data: z.ZodString;
@@ -1706,7 +1706,7 @@ export declare const mulmoPromptTemplateSchema: z.ZodObject<{
1706
1706
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1707
1707
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1708
1708
  kind: z.ZodLiteral<"url">;
1709
- url: z.ZodString;
1709
+ url: z.ZodURL;
1710
1710
  }, z.core.$strict>, z.ZodObject<{
1711
1711
  kind: z.ZodLiteral<"base64">;
1712
1712
  data: z.ZodString;
@@ -1774,7 +1774,7 @@ export declare const mulmoPromptTemplateFileSchema: z.ZodObject<{
1774
1774
  type: z.ZodLiteral<"image">;
1775
1775
  source: z.ZodDiscriminatedUnion<[z.ZodObject<{
1776
1776
  kind: z.ZodLiteral<"url">;
1777
- url: z.ZodString;
1777
+ url: z.ZodURL;
1778
1778
  }, z.core.$strict>, z.ZodObject<{
1779
1779
  kind: z.ZodLiteral<"base64">;
1780
1780
  data: z.ZodString;
@@ -1836,7 +1836,7 @@ export declare const mulmoPromptTemplateFileSchema: z.ZodObject<{
1836
1836
  outroPadding: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1837
1837
  bgm: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1838
1838
  kind: z.ZodLiteral<"url">;
1839
- url: z.ZodString;
1839
+ url: z.ZodURL;
1840
1840
  }, z.core.$strict>, z.ZodObject<{
1841
1841
  kind: z.ZodLiteral<"base64">;
1842
1842
  data: z.ZodString;
@@ -1854,7 +1854,7 @@ export declare const mulmoPromptTemplateFileSchema: z.ZodObject<{
1854
1854
  export declare const mulmoStoryboardSceneSchema: z.ZodObject<{
1855
1855
  description: z.ZodString;
1856
1856
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
1857
- url: z.ZodString;
1857
+ url: z.ZodURL;
1858
1858
  title: z.ZodOptional<z.ZodString>;
1859
1859
  description: z.ZodOptional<z.ZodString>;
1860
1860
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1869,7 +1869,7 @@ export declare const mulmoStoryboardSceneSchema: z.ZodObject<{
1869
1869
  export declare const mulmoStoryboardSchema: z.ZodObject<{
1870
1870
  title: z.ZodString;
1871
1871
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
1872
- url: z.ZodString;
1872
+ url: z.ZodURL;
1873
1873
  title: z.ZodOptional<z.ZodString>;
1874
1874
  description: z.ZodOptional<z.ZodString>;
1875
1875
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1883,7 +1883,7 @@ export declare const mulmoStoryboardSchema: z.ZodObject<{
1883
1883
  scenes: z.ZodArray<z.ZodObject<{
1884
1884
  description: z.ZodString;
1885
1885
  references: z.ZodOptional<z.ZodArray<z.ZodObject<{
1886
- url: z.ZodString;
1886
+ url: z.ZodURL;
1887
1887
  title: z.ZodOptional<z.ZodString>;
1888
1888
  description: z.ZodOptional<z.ZodString>;
1889
1889
  type: z.ZodDefault<z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
@@ -1896,4 +1896,4 @@ export declare const mulmoStoryboardSchema: z.ZodObject<{
1896
1896
  }, z.core.$strip>>>;
1897
1897
  }, z.core.$strict>>;
1898
1898
  }, z.core.$strict>;
1899
- export declare const urlsSchema: z.ZodArray<z.ZodString>;
1899
+ export declare const urlsSchema: z.ZodArray<z.ZodURL>;
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { htmlLLMProvider, provider2TTSAgent, provider2ImageAgent, provider2MovieAgent, defaultProviders, provider2SoundEffectAgent, } from "../utils/provider2agent.js";
3
3
  import { currentMulmoScriptVersion } from "../utils/const.js";
4
4
  export const langSchema = z.string();
5
- const URLStringSchema = z.string().url();
5
+ const URLStringSchema = z.url();
6
6
  export const localizedTextSchema = z
7
7
  .object({
8
8
  text: z.string(),
@@ -493,4 +493,4 @@ export const mulmoStoryboardSchema = z
493
493
  })
494
494
  .describe("A storyboard for a presentation, a story, a video, etc.")
495
495
  .strict();
496
- export const urlsSchema = z.array(z.string().url({ message: "Invalid URL format" }));
496
+ export const urlsSchema = z.array(z.url({ message: "Invalid URL format" }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "2.0.0-alpha.1",
3
+ "version": "2.0.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.node.js",
@@ -86,7 +86,7 @@
86
86
  "@graphai/vanilla_node_agents": "^2.0.4",
87
87
  "@inquirer/input": "^4.2.5",
88
88
  "@inquirer/select": "^4.4.0",
89
- "@modelcontextprotocol/sdk": "^1.21.0",
89
+ "@modelcontextprotocol/sdk": "^1.21.1",
90
90
  "@mozilla/readability": "^0.6.0",
91
91
  "@tavily/core": "^0.5.11",
92
92
  "archiver": "^7.0.1",
@@ -1,5 +0,0 @@
1
- import type { AgentFunction, AgentFunctionInfo } from "graphai";
2
- import type { AgentBufferResult, ImageAgentInputs, ImageAgentParams, GoogleImageAgentConfig } from "../types/agent.js";
3
- export declare const imageGoogleAgent: AgentFunction<ImageAgentParams, AgentBufferResult, ImageAgentInputs, GoogleImageAgentConfig>;
4
- declare const imageGoogleAgentInfo: AgentFunctionInfo;
5
- export default imageGoogleAgentInfo;
@@ -1,86 +0,0 @@
1
- import { GraphAILogger } from "graphai";
2
- import { getAspectRatio } from "./movie_google_agent.js";
3
- import { provider2ImageAgent } from "../utils/provider2agent.js";
4
- async function generateImage(projectId, model, token, prompt, aspectRatio) {
5
- const GOOGLE_IMAGEN_ENDPOINT = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/publishers/google/models/${model}:predict`;
6
- try {
7
- // Prepare the payload for the API request
8
- const payload = {
9
- instances: [
10
- {
11
- prompt,
12
- },
13
- ],
14
- parameters: {
15
- sampleCount: 1,
16
- aspectRatio,
17
- safetySetting: "block_only_high",
18
- },
19
- };
20
- // Make the API call using fetch
21
- const response = await fetch(GOOGLE_IMAGEN_ENDPOINT, {
22
- method: "POST",
23
- headers: {
24
- Authorization: `Bearer ${token}`,
25
- "Content-Type": "application/json",
26
- },
27
- body: JSON.stringify(payload),
28
- });
29
- if (!response.ok) {
30
- throw new Error(`Error: ${response.status} - ${response.statusText}`);
31
- }
32
- const responseData = await response.json();
33
- // Parse and return the generated image URL or data
34
- const predictions = responseData.predictions;
35
- if (predictions && predictions.length > 0) {
36
- const base64Image = predictions[0].bytesBase64Encoded;
37
- if (base64Image) {
38
- return Buffer.from(base64Image, "base64"); // Decode the base64 image to a buffer
39
- }
40
- else {
41
- throw new Error("No base64-encoded image data returned from the API.");
42
- }
43
- }
44
- else {
45
- // console.log(response);
46
- GraphAILogger.info("No predictions returned from the API.", responseData, prompt);
47
- return undefined;
48
- }
49
- }
50
- catch (error) {
51
- GraphAILogger.info("Error generating image:", error);
52
- throw error;
53
- }
54
- }
55
- export const imageGoogleAgent = async ({ namedInputs, params, config, }) => {
56
- const { prompt } = namedInputs;
57
- const aspectRatio = getAspectRatio(params.canvasSize);
58
- const model = params.model ?? provider2ImageAgent["google"].defaultModel;
59
- const projectId = config?.projectId;
60
- const token = config?.token;
61
- try {
62
- const buffer = await generateImage(projectId, model, token, prompt, aspectRatio);
63
- if (buffer) {
64
- return { buffer };
65
- }
66
- throw new Error("ERROR: geneateImage returned undefined");
67
- }
68
- catch (error) {
69
- GraphAILogger.info("Failed to generate image:", error);
70
- throw error;
71
- }
72
- };
73
- const imageGoogleAgentInfo = {
74
- name: "imageGoogleAgent",
75
- agent: imageGoogleAgent,
76
- mock: imageGoogleAgent,
77
- samples: [],
78
- description: "Google Image agent",
79
- category: ["image"],
80
- author: "Receptron Team",
81
- repository: "https://github.com/receptron/mulmocast-cli/",
82
- // source: "https://github.com/receptron/mulmocast-cli/blob/main/src/agents/image_google_agent.ts",
83
- license: "MIT",
84
- environmentVariables: [],
85
- };
86
- export default imageGoogleAgentInfo;
@@ -1,9 +0,0 @@
1
- import type { AgentFunction, AgentFunctionInfo } from "graphai";
2
- import type { AgentBufferResult, GoogleImageAgentConfig, GoogleMovieAgentParams, MovieAgentInputs } from "../types/agent.js";
3
- export declare const getAspectRatio: (canvasSize: {
4
- width: number;
5
- height: number;
6
- }) => string;
7
- export declare const movieGoogleAgent: AgentFunction<GoogleMovieAgentParams, AgentBufferResult, MovieAgentInputs, GoogleImageAgentConfig>;
8
- declare const movieGoogleAgentInfo: AgentFunctionInfo;
9
- export default movieGoogleAgentInfo;
@@ -1,122 +0,0 @@
1
- import { readFileSync } from "fs";
2
- import { GraphAILogger, sleep } from "graphai";
3
- async function generateMovie(projectId, model, token, prompt, imagePath, aspectRatio, duration) {
4
- const GOOGLE_IMAGEN_ENDPOINT = `https://us-central1-aiplatform.googleapis.com/v1/projects/${projectId}/locations/us-central1/publishers/google/models/${model}`;
5
- const payload = {
6
- instances: [
7
- {
8
- prompt,
9
- image: undefined,
10
- },
11
- ],
12
- parameters: {
13
- sampleCount: 1,
14
- aspectRatio,
15
- safetySetting: "block_only_high",
16
- personGeneration: "allow_all",
17
- durationSeconds: duration,
18
- },
19
- };
20
- if (imagePath) {
21
- const buffer = readFileSync(imagePath);
22
- const bytesBase64Encoded = buffer.toString("base64");
23
- payload.instances[0].image = {
24
- bytesBase64Encoded,
25
- mimeType: "image/png",
26
- };
27
- }
28
- // Make the API call using fetch
29
- const response = await fetch(`${GOOGLE_IMAGEN_ENDPOINT}:predictLongRunning`, {
30
- method: "POST",
31
- headers: {
32
- Authorization: `Bearer ${token}`,
33
- "Content-Type": "application/json",
34
- },
35
- body: JSON.stringify(payload),
36
- });
37
- if (!response.ok) {
38
- GraphAILogger.info("create project on google cloud console and setup the project. More details see readme.");
39
- throw new Error(`Error: ${response.status} - ${response.statusText}`);
40
- }
41
- const initialResponse = await response.json();
42
- const fetchBody = {
43
- operationName: initialResponse.name,
44
- };
45
- const completeResponse = await (async () => {
46
- while (true) {
47
- GraphAILogger.info("...waiting for movie generation...");
48
- await sleep(3000);
49
- const operationResponse = await fetch(`${GOOGLE_IMAGEN_ENDPOINT}:fetchPredictOperation`, {
50
- method: "POST",
51
- headers: {
52
- Authorization: `Bearer ${token}`,
53
- "Content-Type": "application/json",
54
- },
55
- body: JSON.stringify(fetchBody),
56
- });
57
- if (!operationResponse.ok) {
58
- throw new Error(`Error: ${operationResponse.status} - ${operationResponse.statusText}`);
59
- }
60
- const responseData = await operationResponse.json();
61
- if (responseData.done) {
62
- if (responseData.error) {
63
- GraphAILogger.info("Prompt: ", prompt);
64
- throw new Error(`Error: ${responseData.error.message}`);
65
- }
66
- if (!responseData.response.videos) {
67
- throw new Error(`No video: ${JSON.stringify(responseData, null, 2)}`);
68
- }
69
- return responseData.response;
70
- }
71
- }
72
- })();
73
- const encodedMovie = completeResponse.videos[0].bytesBase64Encoded;
74
- if (encodedMovie) {
75
- return Buffer.from(encodedMovie, "base64");
76
- }
77
- return undefined;
78
- }
79
- export const getAspectRatio = (canvasSize) => {
80
- if (canvasSize.width > canvasSize.height) {
81
- return "16:9";
82
- }
83
- else if (canvasSize.width < canvasSize.height) {
84
- return "9:16";
85
- }
86
- else {
87
- return "1:1";
88
- }
89
- };
90
- export const movieGoogleAgent = async ({ namedInputs, params, config, }) => {
91
- const { prompt, imagePath } = namedInputs;
92
- const aspectRatio = getAspectRatio(params.canvasSize);
93
- const model = params.model ?? "veo-2.0-generate-001"; // "veo-3.0-generate-preview";
94
- const duration = params.duration ?? 8;
95
- const projectId = config?.projectId;
96
- const token = config?.token;
97
- try {
98
- const buffer = await generateMovie(projectId, model, token, prompt, imagePath, aspectRatio, duration);
99
- if (buffer) {
100
- return { buffer };
101
- }
102
- throw new Error("ERROR: geneateImage returned undefined");
103
- }
104
- catch (error) {
105
- GraphAILogger.info("Failed to generate movie:", error.message);
106
- throw error;
107
- }
108
- };
109
- const movieGoogleAgentInfo = {
110
- name: "movieGoogleAgent",
111
- agent: movieGoogleAgent,
112
- mock: movieGoogleAgent,
113
- samples: [],
114
- description: "Google Movie agent",
115
- category: ["movie"],
116
- author: "Receptron Team",
117
- repository: "https://github.com/receptron/mulmocast-cli/",
118
- // source: "https://github.com/receptron/mulmocast-cli/blob/main/src/agents/image_google_agent.ts",
119
- license: "MIT",
120
- environmentVariables: [],
121
- };
122
- export default movieGoogleAgentInfo;
package/lib/mcp/aaa.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/lib/mcp/aaa.js DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- process.env.DOTENV_CONFIG_QUIET = "true";
3
- import dotenv from "dotenv";
4
- dotenv.config();
@@ -1 +0,0 @@
1
- export {};
package/lib/utils/aaa.js DELETED
@@ -1,16 +0,0 @@
1
- // ``` ``` / ~~~ ~~~ fence
2
- const fenceRe = /(^|\n)(```|~~~)[^\n]*\n([\s\S]*?)\n\2/g;
3
- let m;
4
- while ((m = fenceRe.exec(text))) {
5
- const body = m[3].trim();
6
- if (/^[\[{]/.test(body))
7
- blocks.push(body);
8
- }
9
- // linene `...`
10
- const inlineRe = /`([^`]+)`/g;
11
- while ((m = inlineRe.exec(text))) {
12
- const body = m[1].trim();
13
- if (/^[\[{]/.test(body))
14
- blocks.push(body);
15
- }
16
- export {};
@@ -1 +0,0 @@
1
- export declare const beatId: (id: string | undefined, index: number) => string;
@@ -1,4 +0,0 @@
1
- export const beatId = (id, index) => {
2
- const key = id ?? `__index__${index}`;
3
- return key;
4
- };
@@ -1,2 +0,0 @@
1
- export declare const findFirstJson: (text: string) => any;
2
- export declare const findAllJson: (text: string) => any[];
@@ -1,59 +0,0 @@
1
- // greedy-json-lite.js
2
- export const findFirstJson = (text) => {
3
- for (const block of extractBlocks(text)) {
4
- try {
5
- return JSON.parse(block);
6
- }
7
- catch { }
8
- }
9
- return null;
10
- };
11
- export const findAllJson = (text) => {
12
- const out = [];
13
- for (const block of extractBlocks(text)) {
14
- try {
15
- out.push(JSON.parse(block));
16
- }
17
- catch { }
18
- }
19
- return out;
20
- };
21
- const extractBlocks = (text) => {
22
- const blocks = [];
23
- // greedy( {…} / […])
24
- const starts = [];
25
- for (let i = 0; i < text.length; i++) {
26
- if (text[i] === "{" || text[i] === "[") {
27
- starts.push(i);
28
- }
29
- }
30
- for (const s of starts) {
31
- const open = text[s];
32
- const close = open === "{" ? "}" : "]";
33
- let depth = 0, inStr = null, prev = "";
34
- for (let j = s; j < text.length; j++) {
35
- const ch = text[j];
36
- if (inStr) {
37
- if (ch === inStr && prev !== "\\")
38
- inStr = null;
39
- }
40
- else {
41
- if (ch === '"' || ch === "'" || ch === "`")
42
- inStr = ch;
43
- else if (ch === open)
44
- depth++;
45
- else if (ch === close) {
46
- depth--;
47
- if (depth === 0) {
48
- blocks.push(text.slice(s, j + 1).trim());
49
- break;
50
- }
51
- else if (depth < 0)
52
- break;
53
- }
54
- }
55
- prev = ch;
56
- }
57
- }
58
- return blocks;
59
- };
File without changes
File without changes