@mixio-pro/kalaasetu-mcp 2.0.7-beta → 2.0.8-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.0.7-beta",
3
+ "version": "2.0.8-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",
@@ -160,9 +160,7 @@ export function loadFalConfig(): FalConfig {
160
160
  }
161
161
 
162
162
  try {
163
- const absolutePath = path.isAbsolute(configPath)
164
- ? configPath
165
- : path.join(process.cwd(), configPath);
163
+ const absolutePath = path.resolve(configPath);
166
164
 
167
165
  if (!fs.existsSync(absolutePath)) {
168
166
  console.error(
@@ -212,9 +210,7 @@ export function saveFalConfig(config: FalConfig): boolean {
212
210
  }
213
211
 
214
212
  try {
215
- const absolutePath = path.isAbsolute(configPath)
216
- ? configPath
217
- : path.join(process.cwd(), configPath);
213
+ const absolutePath = path.resolve(configPath);
218
214
 
219
215
  fs.writeFileSync(absolutePath, JSON.stringify(config, null, 2), "utf-8");
220
216
  return true;
@@ -75,18 +75,12 @@ export const falListPresets = {
75
75
  const hasSchema =
76
76
  preset.input_schema && Object.keys(preset.input_schema).length > 0;
77
77
  const shouldFetch = !hasSchema || args.refresh_schemas;
78
- console.log(
79
- `[fal_list_presets] ${
80
- preset.presetName
81
- }: shouldFetch=${shouldFetch}, hasSchema=${!!preset.input_schema}, refresh=${
82
- args.refresh_schemas
83
- }`
84
- );
78
+
85
79
 
86
80
  if (shouldFetch) {
87
81
  try {
88
82
  const url = `https://fal.ai/api/openapi/queue/openapi.json?endpoint_id=${preset.modelId}`;
89
- console.log(`[fal_list_presets] Fetching schema from: ${url}`);
83
+
90
84
  const response = await fetch(url, {
91
85
  method: "GET",
92
86
  signal: AbortSignal.timeout(10000),
@@ -95,22 +89,17 @@ export const falListPresets = {
95
89
  if (response.ok) {
96
90
  const openApiSchema = await response.json();
97
91
  const simplified = extractInputSchema(openApiSchema);
98
- console.log(
99
- `[fal_list_presets] Extracted schema for ${preset.presetName}:`,
100
- simplified ? Object.keys(simplified) : null
101
- );
92
+
102
93
 
103
94
  if (simplified) {
104
95
  preset.input_schema = simplified;
105
96
  updated = true;
106
97
  }
107
98
  } else {
108
- console.log(
109
- `[fal_list_presets] Fetch failed: ${response.status}`
110
- );
99
+
111
100
  }
112
101
  } catch (e: any) {
113
- console.log(
102
+ console.error(
114
103
  `[fal_list_presets] Error fetching schema for ${preset.presetName}:`,
115
104
  e.message
116
105
  );
@@ -120,9 +109,7 @@ export const falListPresets = {
120
109
 
121
110
  // Save updated config if schemas were fetched
122
111
  if (updated) {
123
- console.log(`[fal_list_presets] Saving updated config...`);
124
- const saved = saveFalConfig(config);
125
- console.log(`[fal_list_presets] Config saved: ${saved}`);
112
+ saveFalConfig(config);
126
113
  }
127
114
 
128
115
  // Return enriched preset list