@mixio-pro/kalaasetu-mcp 2.1.0 → 2.1.1-beta
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/package.json +6 -2
- package/src/index.ts +4 -3
- package/src/storage/index.ts +4 -3
- package/src/tools/fal/config.ts +9 -8
- package/src/tools/fal/dynamic-tools.ts +214 -237
- package/src/tools/fal/models.ts +115 -93
- package/src/tools/fal/storage.ts +66 -61
- package/src/tools/gemini.ts +302 -281
- package/src/tools/get-status.ts +50 -46
- package/src/tools/image-to-video.ts +309 -300
- package/src/tools/perplexity.ts +188 -172
- package/src/tools/youtube.ts +45 -41
- package/src/utils/llm-prompt-enhancer.ts +3 -2
- package/src/utils/logger.ts +71 -0
- package/src/utils/openmeter.ts +123 -0
- package/src/utils/prompt-enhancer-presets.ts +7 -5
- package/src/utils/remote-sync.ts +19 -10
- package/src/utils/tool-credits.ts +104 -0
- package/src/utils/tool-wrapper.ts +37 -6
- package/src/utils/url-file.ts +4 -3
- package/src/test-context.ts +0 -52
- package/src/test-error-handling.ts +0 -31
- package/src/tools/image-to-video.sdk-backup.ts +0 -218
package/src/tools/get-status.ts
CHANGED
|
@@ -171,55 +171,59 @@ export const getGenerationStatus = {
|
|
|
171
171
|
resume_endpoint: string;
|
|
172
172
|
source?: "fal" | "vertex" | "auto";
|
|
173
173
|
}) => {
|
|
174
|
-
return safeToolExecute(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
174
|
+
return safeToolExecute(
|
|
175
|
+
async () => {
|
|
176
|
+
const { resume_endpoint, source = "auto" } = args;
|
|
177
|
+
const project_id = "mixio-pro";
|
|
178
|
+
const location_id = "us-central1";
|
|
179
|
+
|
|
180
|
+
// Auto-detect source based on resume_endpoint format
|
|
181
|
+
let detectedSource = source;
|
|
182
|
+
if (source === "auto") {
|
|
183
|
+
if (
|
|
184
|
+
resume_endpoint.startsWith("https://queue.fal.run") ||
|
|
185
|
+
resume_endpoint.startsWith("https://fal.run")
|
|
186
|
+
) {
|
|
187
|
+
detectedSource = "fal";
|
|
188
|
+
} else {
|
|
189
|
+
detectedSource = "vertex";
|
|
190
|
+
}
|
|
189
191
|
}
|
|
190
|
-
}
|
|
191
192
|
|
|
192
|
-
|
|
193
|
+
let result: any;
|
|
193
194
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
if (detectedSource === "fal") {
|
|
196
|
+
result = await checkFalStatus(resume_endpoint);
|
|
197
|
+
} else {
|
|
198
|
+
result = await checkVertexStatus(resume_endpoint);
|
|
199
|
+
}
|
|
199
200
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
201
|
+
// Normalize the response
|
|
202
|
+
const status =
|
|
203
|
+
(result as any).status ||
|
|
204
|
+
((result as any).done ? "COMPLETED" : "IN_PROGRESS");
|
|
205
|
+
|
|
206
|
+
const safeResult = sanitizeResponse(result);
|
|
207
|
+
|
|
208
|
+
return JSON.stringify(
|
|
209
|
+
{
|
|
210
|
+
source: detectedSource,
|
|
211
|
+
status,
|
|
212
|
+
resume_endpoint,
|
|
213
|
+
result: safeResult,
|
|
214
|
+
message:
|
|
215
|
+
status === "COMPLETED"
|
|
216
|
+
? "Generation completed! Check 'result.response.saved_videos' for the video URLs."
|
|
217
|
+
: status === "FAILED"
|
|
218
|
+
? "Generation failed. Check the 'result' field for error details."
|
|
219
|
+
: "Generation is still in progress. Call this tool again with the same resume_endpoint to check later.",
|
|
220
|
+
},
|
|
221
|
+
null,
|
|
222
|
+
2,
|
|
223
|
+
);
|
|
224
|
+
},
|
|
225
|
+
"get_generation_status",
|
|
226
|
+
{ toolName: "get_generation_status" },
|
|
227
|
+
);
|
|
224
228
|
},
|
|
225
229
|
};
|