@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mixio-pro/kalaasetu-mcp",
3
- "version": "2.1.0",
3
+ "version": "2.1.1-beta",
4
4
  "description": "A powerful Model Context Protocol server providing AI tools for content generation and analysis",
5
5
  "type": "module",
6
6
  "module": "src/index.ts",
@@ -50,6 +50,8 @@
50
50
  "dependencies": {
51
51
  "@fal-ai/client": "^1.7.2",
52
52
  "@google/genai": "^1.28.0",
53
+ "@openmeter/sdk": "^1.0.0-beta.226",
54
+ "@sentry/node": "^10.36.0",
53
55
  "@types/node": "^24.10.1",
54
56
  "@types/wav": "^1.0.4",
55
57
  "fastmcp": "3.26.8",
@@ -57,6 +59,8 @@
57
59
  "google-auth-library": "^10.5.0",
58
60
  "jsonata": "^2.1.0",
59
61
  "wav": "^1.0.2",
62
+ "winston": "^3.19.0",
63
+ "winston-transport-sentry-node": "^3.0.0",
60
64
  "zod": "^4.1.12"
61
65
  }
62
- }
66
+ }
package/src/index.ts CHANGED
@@ -13,6 +13,7 @@ import { getGenerationStatus } from "./tools/get-status";
13
13
 
14
14
  import { syncFalConfig } from "./tools/fal/config";
15
15
  import { syncPromptEnhancerConfigs } from "./utils/prompt-enhancer-presets";
16
+ import { logger } from "./utils/logger";
16
17
 
17
18
  const server = new FastMCP({
18
19
  name: "Kalaasetu MCP Server",
@@ -20,7 +21,7 @@ const server = new FastMCP({
20
21
  });
21
22
 
22
23
  async function main() {
23
- console.log("🚀 Initializing Kalaasetu MCP Server...");
24
+ logger.info("🚀 Initializing Kalaasetu MCP Server...");
24
25
 
25
26
  // 1. Sync Remote Configs
26
27
  await Promise.all([syncFalConfig(), syncPromptEnhancerConfigs()]);
@@ -45,13 +46,13 @@ async function main() {
45
46
  // 5. Add Status Tool
46
47
  server.addTool(getGenerationStatus);
47
48
 
48
- console.log("✅ Starting server transport...");
49
+ logger.info("✅ Starting server transport...");
49
50
  server.start({
50
51
  transportType: "stdio",
51
52
  });
52
53
  }
53
54
 
54
55
  main().catch((err) => {
55
- console.error("❌ Failed to start server:", err);
56
+ logger.error("❌ Failed to start server:", err);
56
57
  process.exit(1);
57
58
  });
@@ -1,14 +1,15 @@
1
1
  import type { StorageProvider } from "./interface";
2
2
  import { LocalStorageProvider } from "./local";
3
3
  import { GCSStorageProvider } from "./gcs";
4
+ import { logger } from "../utils/logger";
4
5
 
5
6
  let storageInstance: StorageProvider | null = null;
6
7
 
7
8
  export function getStorage(): StorageProvider {
8
9
  if (!storageInstance) {
9
10
  const type = process.env.STORAGE_PROVIDER || "local";
10
- console.error(`Initializing storage provider: ${type}`);
11
- console.error(`Base path (cwd): ${process.cwd()}`);
11
+ logger.info(`Initializing storage provider: ${type}`);
12
+ logger.info(`Base path (cwd): ${process.cwd()}`);
12
13
 
13
14
  if (type === "gcs") {
14
15
  const bucket = process.env.GCS_BUCKET;
@@ -25,7 +26,7 @@ export function getStorage(): StorageProvider {
25
26
  // Initialize async
26
27
  storageInstance
27
28
  .init()
28
- .catch((err) => console.error("Failed to init storage:", err));
29
+ .catch((err) => logger.error("Failed to init storage:", err));
29
30
  }
30
31
  return storageInstance;
31
32
  }
@@ -4,6 +4,7 @@
4
4
  import * as fs from "fs";
5
5
  import * as path from "path";
6
6
  import type { PromptEnhancerConfig } from "../../utils/prompt-enhancer";
7
+ import { logger } from "../../utils/logger";
7
8
 
8
9
  // API URLs
9
10
  export const FAL_BASE_URL = "https://fal.ai/api";
@@ -112,9 +113,9 @@ export const DEFAULT_PRESETS: FalPresetConfig[] = [
112
113
  },
113
114
  transformers: {
114
115
  types: {
115
- duration: "number"
116
- }
117
- }
116
+ duration: "number",
117
+ },
118
+ },
118
119
  },
119
120
  {
120
121
  presetName: "ltx_retake_video",
@@ -133,13 +134,13 @@ export const DEFAULT_PRESETS: FalPresetConfig[] = [
133
134
  start_time: {
134
135
  type: "number",
135
136
  description: "Start timestamp for the edit.",
136
- default: 0
137
+ default: 0,
137
138
  },
138
139
  end_time: {
139
140
  type: "number",
140
- description: "End timestamp for the edit."
141
+ description: "End timestamp for the edit.",
141
142
  },
142
- }
143
+ },
143
144
  },
144
145
  ];
145
146
 
@@ -193,7 +194,7 @@ export function saveFalConfig(config: FalConfig): boolean {
193
194
  }
194
195
 
195
196
  if (!configPath) {
196
- console.error("Cannot save config: no config file path found.");
197
+ logger.warn("Cannot save config: no config file path found.");
197
198
  return false;
198
199
  }
199
200
 
@@ -203,7 +204,7 @@ export function saveFalConfig(config: FalConfig): boolean {
203
204
  fs.writeFileSync(absolutePath, JSON.stringify(config, null, 2), "utf-8");
204
205
  return true;
205
206
  } catch (error: any) {
206
- console.error(`Error saving FAL config: ${error.message}`);
207
+ logger.error(`Error saving FAL config: ${error.message}`);
207
208
  return false;
208
209
  }
209
210
  }