@gui-chat-plugin/mulmocast 0.0.2 → 0.1.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.
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -9
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -9
- package/dist/samples-Dp1dUlUh.cjs +1 -0
- package/dist/samples-SOf0ey-s.js +159 -0
- package/dist/style.css +3 -1
- package/dist/vue/View.vue.d.ts.map +1 -1
- package/dist/vue.cjs +1 -1
- package/dist/vue.js +743 -702
- package/package.json +20 -12
- package/dist/index-BKaPBxSE.cjs +0 -1
- package/dist/index-BaFRLiBo.js +0 -163
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gui-chat-plugin/mulmocast",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Mulmocast presentation plugin for GUI Chat applications",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -25,27 +25,35 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"dev": "vite",
|
|
27
27
|
"build": "vite build && vue-tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
28
|
+
"typecheck": "vue-tsc --noEmit",
|
|
28
29
|
"lint": "eslint .",
|
|
29
30
|
"preview": "vite preview"
|
|
30
31
|
},
|
|
31
32
|
"dependencies": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"mulmocast
|
|
33
|
+
"@mulmocast/types": "^2.6.5",
|
|
34
|
+
"gui-chat-protocol": "^0.1.0",
|
|
35
|
+
"mulmocast": "^2.6.5",
|
|
36
|
+
"mulmocast-viewer": "^0.2.4",
|
|
35
37
|
"uuid": "^13.0.0"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
|
-
"@
|
|
40
|
+
"@eslint/js": "^10.0.1",
|
|
41
|
+
"@tailwindcss/vite": "^4.2.2",
|
|
39
42
|
"@types/node": "^25.0.9",
|
|
40
43
|
"@types/uuid": "^11.0.0",
|
|
41
|
-
"@
|
|
42
|
-
"eslint": "^
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
45
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
46
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
47
|
+
"eslint": "^10.1.0",
|
|
48
|
+
"eslint-plugin-vue": "^10.8.0",
|
|
49
|
+
"globals": "^17.4.0",
|
|
50
|
+
"tailwindcss": "^4.2.2",
|
|
51
|
+
"typescript": "~6.0.2",
|
|
52
|
+
"vite": "^8.0.3",
|
|
46
53
|
"vite-plugin-dts": "^4.4.0",
|
|
47
|
-
"vue": "^3.5.
|
|
48
|
-
"vue-
|
|
54
|
+
"vue": "^3.5.31",
|
|
55
|
+
"vue-eslint-parser": "^10.4.0",
|
|
56
|
+
"vue-tsc": "^3.2.6"
|
|
49
57
|
},
|
|
50
58
|
"peerDependencies": {
|
|
51
59
|
"vue": "^3.5.0"
|
package/dist/index-BKaPBxSE.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const u="showPresentation",h={type:"function",name:u,description:"Let MulmoCast to process a given MulmoScript to generate a presentation of a given topic or story.",parameters:{type:"object",properties:{title:{type:"string",description:"The title of the presentation"},lang:{type:"string",description:"The language of the presentation, such as en, ja, etc."},beats:{type:"array",items:{type:"object",properties:{text:{type:"string",description:"The text to be spoken by the presenter, which is also used to generate an image if there is no imagePrompt. Typically 50 to 70 words."},imagePrompt:{type:"string",description:"Optional prompt to be used to generate an image. Typically 50 to 70 words. Do not specify the image style."}},required:["text"],additionalProperties:!1},minItems:1}},required:["title","lang","beats"],additionalProperties:!1}},a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function I(e,t=0){return(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase()}let m;const P=new Uint8Array(16);function v(){if(!m){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");m=crypto.getRandomValues.bind(crypto)}return m(P)}const x=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),d={randomUUID:x};function D(e,t,o){e=e||{};const i=e.random??e.rng?.()??v();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,I(i)}function y(e,t,o){return d.randomUUID&&!e?d.randomUUID():D(e)}const c=async(e,t)=>{const{title:o,beats:i}=t,g=e.app?.loadBlankImageBase64?await e.app.loadBlankImageBase64():"",w=g?[g]:[],l=i.map(r=>({id:y(),speaker:"Presenter",text:r.text,imagePrompt:r.imagePrompt})),p={};if(e.app?.generateImageWithBackend){const r=l.map(async n=>{const f=n.imagePrompt||`generate image appropriate for the text. <text>${n.text}</text>. Let the art convey the story and emotions without text. Use the last image for the aspect ratio.`;try{const s=await e.app.generateImageWithBackend(f,w,e);if(s.success&&s.imageData)return{id:n.id,imageData:s.imageData}}catch(s){console.error("Failed to generate image for beat:",s)}return{id:n.id,imageData:null}});(await Promise.all(r)).forEach(n=>{n.imageData&&(p[n.id]=n.imageData)})}const b={$mulmocast:{version:"1.1"},canvasSize:{width:1536,height:1080},imageParams:{provider:"google",model:"gemini-2.5-flash-image-preview"},audioParams:{padding:.2,introPadding:.5,closingPadding:.5,outroPadding:.5,bgmVolume:.1,audioVolume:1.5,suppressSpeech:!1},soundEffectParams:{},speechParams:{speakers:{Presenter:{voiceId:"shimmer"}}},title:o,lang:t.lang,beats:l};return{message:`Mulmocast has processed the MulmoScript for "${o}" with ${i.length} beats. Movie generation will begin automatically.`,title:o,instructions:"Acknowledge that all the images were successfully generated and that the movie is being generated.",data:{mulmoScript:b,images:p}}},M={toolDefinition:h,execute:c,generatingMessage:"Processing with Mulmocast...",waitingMessage:"Tell the user that the script was written and we are generating images and video with Mulmocast.",isEnabled:()=>!0,backends:["imageGen","mulmocast"]},T=c,U=[{name:"Simple Presentation",args:{title:"Introduction to AI",lang:"en",beats:[{text:"Artificial Intelligence is transforming the way we live and work. From voice assistants to self-driving cars, AI is becoming an integral part of our daily lives.",imagePrompt:"A futuristic city with AI-powered robots and flying vehicles"},{text:"Machine learning, a subset of AI, enables computers to learn from data without being explicitly programmed. This technology powers recommendation systems and fraud detection."}]}}];exports.TOOL_DEFINITION=h;exports.TOOL_NAME=u;exports.executeMulmocast=T;exports.pluginCore=M;exports.samples=U;exports.showPresentation=c;exports.v4=y;
|
package/dist/index-BaFRLiBo.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
const w = "showPresentation", b = {
|
|
2
|
-
type: "function",
|
|
3
|
-
name: w,
|
|
4
|
-
description: "Let MulmoCast to process a given MulmoScript to generate a presentation of a given topic or story.",
|
|
5
|
-
parameters: {
|
|
6
|
-
type: "object",
|
|
7
|
-
properties: {
|
|
8
|
-
title: { type: "string", description: "The title of the presentation" },
|
|
9
|
-
lang: {
|
|
10
|
-
type: "string",
|
|
11
|
-
description: "The language of the presentation, such as en, ja, etc."
|
|
12
|
-
},
|
|
13
|
-
beats: {
|
|
14
|
-
type: "array",
|
|
15
|
-
items: {
|
|
16
|
-
type: "object",
|
|
17
|
-
properties: {
|
|
18
|
-
text: {
|
|
19
|
-
type: "string",
|
|
20
|
-
description: "The text to be spoken by the presenter, which is also used to generate an image if there is no imagePrompt. Typically 50 to 70 words."
|
|
21
|
-
},
|
|
22
|
-
imagePrompt: {
|
|
23
|
-
type: "string",
|
|
24
|
-
description: "Optional prompt to be used to generate an image. Typically 50 to 70 words. Do not specify the image style."
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
required: ["text"],
|
|
28
|
-
additionalProperties: !1
|
|
29
|
-
},
|
|
30
|
-
minItems: 1
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
required: ["title", "lang", "beats"],
|
|
34
|
-
additionalProperties: !1
|
|
35
|
-
}
|
|
36
|
-
}, a = [];
|
|
37
|
-
for (let e = 0; e < 256; ++e)
|
|
38
|
-
a.push((e + 256).toString(16).slice(1));
|
|
39
|
-
function f(e, t = 0) {
|
|
40
|
-
return (a[e[t + 0]] + a[e[t + 1]] + a[e[t + 2]] + a[e[t + 3]] + "-" + a[e[t + 4]] + a[e[t + 5]] + "-" + a[e[t + 6]] + a[e[t + 7]] + "-" + a[e[t + 8]] + a[e[t + 9]] + "-" + a[e[t + 10]] + a[e[t + 11]] + a[e[t + 12]] + a[e[t + 13]] + a[e[t + 14]] + a[e[t + 15]]).toLowerCase();
|
|
41
|
-
}
|
|
42
|
-
let m;
|
|
43
|
-
const P = new Uint8Array(16);
|
|
44
|
-
function I() {
|
|
45
|
-
if (!m) {
|
|
46
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
47
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
48
|
-
m = crypto.getRandomValues.bind(crypto);
|
|
49
|
-
}
|
|
50
|
-
return m(P);
|
|
51
|
-
}
|
|
52
|
-
const v = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), p = { randomUUID: v };
|
|
53
|
-
function x(e, t, s) {
|
|
54
|
-
e = e || {};
|
|
55
|
-
const i = e.random ?? e.rng?.() ?? I();
|
|
56
|
-
if (i.length < 16)
|
|
57
|
-
throw new Error("Random bytes length must be >= 16");
|
|
58
|
-
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, f(i);
|
|
59
|
-
}
|
|
60
|
-
function D(e, t, s) {
|
|
61
|
-
return p.randomUUID && !e ? p.randomUUID() : x(e);
|
|
62
|
-
}
|
|
63
|
-
const d = async (e, t) => {
|
|
64
|
-
const { title: s, beats: i } = t, g = e.app?.loadBlankImageBase64 ? await e.app.loadBlankImageBase64() : "", u = g ? [g] : [], c = i.map((r) => ({
|
|
65
|
-
id: D(),
|
|
66
|
-
speaker: "Presenter",
|
|
67
|
-
text: r.text,
|
|
68
|
-
imagePrompt: r.imagePrompt
|
|
69
|
-
})), l = {};
|
|
70
|
-
if (e.app?.generateImageWithBackend) {
|
|
71
|
-
const r = c.map(async (n) => {
|
|
72
|
-
const y = n.imagePrompt || `generate image appropriate for the text. <text>${n.text}</text>. Let the art convey the story and emotions without text. Use the last image for the aspect ratio.`;
|
|
73
|
-
try {
|
|
74
|
-
const o = await e.app.generateImageWithBackend(
|
|
75
|
-
y,
|
|
76
|
-
u,
|
|
77
|
-
e
|
|
78
|
-
);
|
|
79
|
-
if (o.success && o.imageData)
|
|
80
|
-
return { id: n.id, imageData: o.imageData };
|
|
81
|
-
} catch (o) {
|
|
82
|
-
console.error("Failed to generate image for beat:", o);
|
|
83
|
-
}
|
|
84
|
-
return { id: n.id, imageData: null };
|
|
85
|
-
});
|
|
86
|
-
(await Promise.all(r)).forEach((n) => {
|
|
87
|
-
n.imageData && (l[n.id] = n.imageData);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
const h = {
|
|
91
|
-
$mulmocast: { version: "1.1" },
|
|
92
|
-
canvasSize: {
|
|
93
|
-
width: 1536,
|
|
94
|
-
height: 1080
|
|
95
|
-
},
|
|
96
|
-
imageParams: {
|
|
97
|
-
provider: "google",
|
|
98
|
-
model: "gemini-2.5-flash-image-preview"
|
|
99
|
-
},
|
|
100
|
-
audioParams: {
|
|
101
|
-
padding: 0.2,
|
|
102
|
-
introPadding: 0.5,
|
|
103
|
-
closingPadding: 0.5,
|
|
104
|
-
outroPadding: 0.5,
|
|
105
|
-
bgmVolume: 0.1,
|
|
106
|
-
audioVolume: 1.5,
|
|
107
|
-
suppressSpeech: !1
|
|
108
|
-
},
|
|
109
|
-
soundEffectParams: {},
|
|
110
|
-
speechParams: {
|
|
111
|
-
speakers: {
|
|
112
|
-
Presenter: {
|
|
113
|
-
voiceId: "shimmer"
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
title: s,
|
|
118
|
-
lang: t.lang,
|
|
119
|
-
beats: c
|
|
120
|
-
};
|
|
121
|
-
return {
|
|
122
|
-
message: `Mulmocast has processed the MulmoScript for "${s}" with ${i.length} beats. Movie generation will begin automatically.`,
|
|
123
|
-
title: s,
|
|
124
|
-
instructions: "Acknowledge that all the images were successfully generated and that the movie is being generated.",
|
|
125
|
-
data: {
|
|
126
|
-
mulmoScript: h,
|
|
127
|
-
images: l
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}, U = {
|
|
131
|
-
toolDefinition: b,
|
|
132
|
-
execute: d,
|
|
133
|
-
generatingMessage: "Processing with Mulmocast...",
|
|
134
|
-
waitingMessage: "Tell the user that the script was written and we are generating images and video with Mulmocast.",
|
|
135
|
-
isEnabled: () => !0,
|
|
136
|
-
backends: ["imageGen", "mulmocast"]
|
|
137
|
-
}, k = d, A = [
|
|
138
|
-
{
|
|
139
|
-
name: "Simple Presentation",
|
|
140
|
-
args: {
|
|
141
|
-
title: "Introduction to AI",
|
|
142
|
-
lang: "en",
|
|
143
|
-
beats: [
|
|
144
|
-
{
|
|
145
|
-
text: "Artificial Intelligence is transforming the way we live and work. From voice assistants to self-driving cars, AI is becoming an integral part of our daily lives.",
|
|
146
|
-
imagePrompt: "A futuristic city with AI-powered robots and flying vehicles"
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
text: "Machine learning, a subset of AI, enables computers to learn from data without being explicitly programmed. This technology powers recommendation systems and fraud detection."
|
|
150
|
-
}
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
];
|
|
155
|
-
export {
|
|
156
|
-
b as T,
|
|
157
|
-
w as a,
|
|
158
|
-
d as b,
|
|
159
|
-
k as e,
|
|
160
|
-
U as p,
|
|
161
|
-
A as s,
|
|
162
|
-
D as v
|
|
163
|
-
};
|