@juspay/neurolink 8.10.1 → 8.12.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/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [8.12.0](https://github.com/juspay/neurolink/compare/v8.11.0...v8.12.0) (2025-12-13)
2
+
3
+ ### Features
4
+
5
+ - **(files):** Install office processing dependencies: mammoth, xlsx, adm-zip, xml2js with TypeScript types ([a236818](https://github.com/juspay/neurolink/commit/a2368182e99b58a599e77e43e823439464a2f829))
6
+
7
+ ## [8.11.0](https://github.com/juspay/neurolink/compare/v8.10.1...v8.11.0) (2025-12-12)
8
+
9
+ ### Features
10
+
11
+ - **(tts):** implement TTSProcessor skeleton class with handler registry ([8dc63d1](https://github.com/juspay/neurolink/commit/8dc63d15d8b71845145349b932651980aef61aa8))
12
+
1
13
  ## [8.10.1](https://github.com/juspay/neurolink/compare/v8.10.0...v8.10.1) (2025-12-12)
2
14
 
3
15
  ### Bug Fixes
@@ -85,6 +85,35 @@ export declare const VALID_TTS_QUALITIES: readonly TTSQuality[];
85
85
  * Type guard to check if an object is a TTSResult
86
86
  */
87
87
  export declare function isTTSResult(value: unknown): value is TTSResult;
88
+ /**
89
+ * TTS Handler type for provider-specific implementations
90
+ *
91
+ * Each provider (Google AI, OpenAI, etc.) implements this type
92
+ * to provide TTS generation capabilities using their respective APIs.
93
+ */
94
+ export type TTSHandler = {
95
+ /**
96
+ * Generate audio from text using provider-specific TTS API
97
+ *
98
+ * @param text - Text to convert to speech
99
+ * @param options - TTS configuration options
100
+ * @returns Audio buffer with metadata
101
+ */
102
+ synthesize(text: string, options: TTSOptions): Promise<TTSResult>;
103
+ /**
104
+ * Get available voices for the provider
105
+ *
106
+ * @param languageCode - Optional language filter (e.g., "en-US")
107
+ * @returns List of available voices
108
+ */
109
+ getVoices(languageCode?: string): Promise<TTSVoice[]>;
110
+ /**
111
+ * Validate that the provider is properly configured
112
+ *
113
+ * @returns True if provider can generate TTS
114
+ */
115
+ isConfigured(): boolean;
116
+ };
88
117
  /**
89
118
  * Type guard to check if TTSOptions are valid
90
119
  */
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Text-to-Speech (TTS) Processing Utility
3
+ *
4
+ * Central orchestrator for all TTS operations across providers.
5
+ * Manages provider-specific TTS handlers and audio generation.
6
+ *
7
+ * @module utils/ttsProcessor
8
+ */
9
+ import type { TTSHandler } from "../types/ttsTypes.js";
10
+ /**
11
+ * TTS processor class for orchestrating text-to-speech operations
12
+ *
13
+ * Follows the same pattern as CSVProcessor, ImageProcessor, and PDFProcessor.
14
+ * Provides a unified interface for TTS generation across multiple providers.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Register a handler
19
+ * TTSProcessor.registerHandler('google-ai', googleAIHandler);
20
+ *
21
+ * // Check if provider is supported
22
+ * if (TTSProcessor.supports('google-ai')) {
23
+ * // Provider is registered
24
+ * }
25
+ * ```
26
+ */
27
+ export declare class TTSProcessor {
28
+ /**
29
+ * Handler registry mapping provider names to TTS handlers
30
+ * Uses Map for O(1) lookups and better type safety
31
+ *
32
+ * @private
33
+ */
34
+ private static readonly handlers;
35
+ /**
36
+ * Register a TTS handler for a specific provider
37
+ *
38
+ * Allows providers to register their TTS implementation at runtime.
39
+ *
40
+ * @param providerName - Provider identifier (e.g., 'google-ai', 'openai')
41
+ * @param handler - TTS handler implementation
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const googleHandler: TTSHandler = {
46
+ * synthesize: async (text, options) => { ... },
47
+ * getVoices: async (languageCode) => { ... },
48
+ * isConfigured: () => true
49
+ * };
50
+ *
51
+ * TTSProcessor.registerHandler('google-ai', googleHandler);
52
+ * ```
53
+ */
54
+ static registerHandler(providerName: string, handler: TTSHandler): void;
55
+ /**
56
+ * Get a registered TTS handler by provider name
57
+ *
58
+ * @private
59
+ * @param providerName - Provider identifier
60
+ * @returns Handler instance or undefined if not registered
61
+ */
62
+ private static getHandler;
63
+ /**
64
+ * Check if a provider is supported (has a registered TTS handler)
65
+ *
66
+ * @param providerName - Provider identifier
67
+ * @returns True if handler is registered
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * if (TTSProcessor.supports('google-ai')) {
72
+ * console.log('Google AI TTS is supported');
73
+ * }
74
+ * ```
75
+ */
76
+ static supports(providerName: string): boolean;
77
+ }
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Text-to-Speech (TTS) Processing Utility
3
+ *
4
+ * Central orchestrator for all TTS operations across providers.
5
+ * Manages provider-specific TTS handlers and audio generation.
6
+ *
7
+ * @module utils/ttsProcessor
8
+ */
9
+ import { logger } from "./logger.js";
10
+ /**
11
+ * TTS processor class for orchestrating text-to-speech operations
12
+ *
13
+ * Follows the same pattern as CSVProcessor, ImageProcessor, and PDFProcessor.
14
+ * Provides a unified interface for TTS generation across multiple providers.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Register a handler
19
+ * TTSProcessor.registerHandler('google-ai', googleAIHandler);
20
+ *
21
+ * // Check if provider is supported
22
+ * if (TTSProcessor.supports('google-ai')) {
23
+ * // Provider is registered
24
+ * }
25
+ * ```
26
+ */
27
+ export class TTSProcessor {
28
+ /**
29
+ * Handler registry mapping provider names to TTS handlers
30
+ * Uses Map for O(1) lookups and better type safety
31
+ *
32
+ * @private
33
+ */
34
+ static handlers = new Map();
35
+ /**
36
+ * Register a TTS handler for a specific provider
37
+ *
38
+ * Allows providers to register their TTS implementation at runtime.
39
+ *
40
+ * @param providerName - Provider identifier (e.g., 'google-ai', 'openai')
41
+ * @param handler - TTS handler implementation
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const googleHandler: TTSHandler = {
46
+ * synthesize: async (text, options) => { ... },
47
+ * getVoices: async (languageCode) => { ... },
48
+ * isConfigured: () => true
49
+ * };
50
+ *
51
+ * TTSProcessor.registerHandler('google-ai', googleHandler);
52
+ * ```
53
+ */
54
+ static registerHandler(providerName, handler) {
55
+ if (!providerName) {
56
+ throw new Error("Provider name is required");
57
+ }
58
+ if (!handler) {
59
+ throw new Error("Handler is required");
60
+ }
61
+ const normalizedName = providerName.toLowerCase();
62
+ if (this.handlers.has(normalizedName)) {
63
+ logger.warn(`[TTSProcessor] Overwriting existing handler for provider: ${normalizedName}`);
64
+ }
65
+ this.handlers.set(normalizedName, handler);
66
+ logger.debug(`[TTSProcessor] Registered TTS handler for provider: ${normalizedName}`);
67
+ }
68
+ /**
69
+ * Get a registered TTS handler by provider name
70
+ *
71
+ * @private
72
+ * @param providerName - Provider identifier
73
+ * @returns Handler instance or undefined if not registered
74
+ */
75
+ static getHandler(providerName) {
76
+ const normalizedName = providerName.toLowerCase();
77
+ return this.handlers.get(normalizedName);
78
+ }
79
+ /**
80
+ * Check if a provider is supported (has a registered TTS handler)
81
+ *
82
+ * @param providerName - Provider identifier
83
+ * @returns True if handler is registered
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * if (TTSProcessor.supports('google-ai')) {
88
+ * console.log('Google AI TTS is supported');
89
+ * }
90
+ * ```
91
+ */
92
+ static supports(providerName) {
93
+ if (!providerName) {
94
+ logger.error("[TTSProcessor] Provider name is required for supports check");
95
+ return false;
96
+ }
97
+ const normalizedName = providerName.toLowerCase();
98
+ const isSupported = this.handlers.has(normalizedName);
99
+ if (!isSupported) {
100
+ logger.debug(`[TTSProcessor] Provider ${providerName} is not supported`);
101
+ }
102
+ return isSupported;
103
+ }
104
+ }
105
+ //# sourceMappingURL=ttsProcessor.js.map
@@ -85,6 +85,35 @@ export declare const VALID_TTS_QUALITIES: readonly TTSQuality[];
85
85
  * Type guard to check if an object is a TTSResult
86
86
  */
87
87
  export declare function isTTSResult(value: unknown): value is TTSResult;
88
+ /**
89
+ * TTS Handler type for provider-specific implementations
90
+ *
91
+ * Each provider (Google AI, OpenAI, etc.) implements this type
92
+ * to provide TTS generation capabilities using their respective APIs.
93
+ */
94
+ export type TTSHandler = {
95
+ /**
96
+ * Generate audio from text using provider-specific TTS API
97
+ *
98
+ * @param text - Text to convert to speech
99
+ * @param options - TTS configuration options
100
+ * @returns Audio buffer with metadata
101
+ */
102
+ synthesize(text: string, options: TTSOptions): Promise<TTSResult>;
103
+ /**
104
+ * Get available voices for the provider
105
+ *
106
+ * @param languageCode - Optional language filter (e.g., "en-US")
107
+ * @returns List of available voices
108
+ */
109
+ getVoices(languageCode?: string): Promise<TTSVoice[]>;
110
+ /**
111
+ * Validate that the provider is properly configured
112
+ *
113
+ * @returns True if provider can generate TTS
114
+ */
115
+ isConfigured(): boolean;
116
+ };
88
117
  /**
89
118
  * Type guard to check if TTSOptions are valid
90
119
  */
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Text-to-Speech (TTS) Processing Utility
3
+ *
4
+ * Central orchestrator for all TTS operations across providers.
5
+ * Manages provider-specific TTS handlers and audio generation.
6
+ *
7
+ * @module utils/ttsProcessor
8
+ */
9
+ import type { TTSHandler } from "../types/ttsTypes.js";
10
+ /**
11
+ * TTS processor class for orchestrating text-to-speech operations
12
+ *
13
+ * Follows the same pattern as CSVProcessor, ImageProcessor, and PDFProcessor.
14
+ * Provides a unified interface for TTS generation across multiple providers.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Register a handler
19
+ * TTSProcessor.registerHandler('google-ai', googleAIHandler);
20
+ *
21
+ * // Check if provider is supported
22
+ * if (TTSProcessor.supports('google-ai')) {
23
+ * // Provider is registered
24
+ * }
25
+ * ```
26
+ */
27
+ export declare class TTSProcessor {
28
+ /**
29
+ * Handler registry mapping provider names to TTS handlers
30
+ * Uses Map for O(1) lookups and better type safety
31
+ *
32
+ * @private
33
+ */
34
+ private static readonly handlers;
35
+ /**
36
+ * Register a TTS handler for a specific provider
37
+ *
38
+ * Allows providers to register their TTS implementation at runtime.
39
+ *
40
+ * @param providerName - Provider identifier (e.g., 'google-ai', 'openai')
41
+ * @param handler - TTS handler implementation
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const googleHandler: TTSHandler = {
46
+ * synthesize: async (text, options) => { ... },
47
+ * getVoices: async (languageCode) => { ... },
48
+ * isConfigured: () => true
49
+ * };
50
+ *
51
+ * TTSProcessor.registerHandler('google-ai', googleHandler);
52
+ * ```
53
+ */
54
+ static registerHandler(providerName: string, handler: TTSHandler): void;
55
+ /**
56
+ * Get a registered TTS handler by provider name
57
+ *
58
+ * @private
59
+ * @param providerName - Provider identifier
60
+ * @returns Handler instance or undefined if not registered
61
+ */
62
+ private static getHandler;
63
+ /**
64
+ * Check if a provider is supported (has a registered TTS handler)
65
+ *
66
+ * @param providerName - Provider identifier
67
+ * @returns True if handler is registered
68
+ *
69
+ * @example
70
+ * ```typescript
71
+ * if (TTSProcessor.supports('google-ai')) {
72
+ * console.log('Google AI TTS is supported');
73
+ * }
74
+ * ```
75
+ */
76
+ static supports(providerName: string): boolean;
77
+ }
@@ -0,0 +1,104 @@
1
+ /**
2
+ * Text-to-Speech (TTS) Processing Utility
3
+ *
4
+ * Central orchestrator for all TTS operations across providers.
5
+ * Manages provider-specific TTS handlers and audio generation.
6
+ *
7
+ * @module utils/ttsProcessor
8
+ */
9
+ import { logger } from "./logger.js";
10
+ /**
11
+ * TTS processor class for orchestrating text-to-speech operations
12
+ *
13
+ * Follows the same pattern as CSVProcessor, ImageProcessor, and PDFProcessor.
14
+ * Provides a unified interface for TTS generation across multiple providers.
15
+ *
16
+ * @example
17
+ * ```typescript
18
+ * // Register a handler
19
+ * TTSProcessor.registerHandler('google-ai', googleAIHandler);
20
+ *
21
+ * // Check if provider is supported
22
+ * if (TTSProcessor.supports('google-ai')) {
23
+ * // Provider is registered
24
+ * }
25
+ * ```
26
+ */
27
+ export class TTSProcessor {
28
+ /**
29
+ * Handler registry mapping provider names to TTS handlers
30
+ * Uses Map for O(1) lookups and better type safety
31
+ *
32
+ * @private
33
+ */
34
+ static handlers = new Map();
35
+ /**
36
+ * Register a TTS handler for a specific provider
37
+ *
38
+ * Allows providers to register their TTS implementation at runtime.
39
+ *
40
+ * @param providerName - Provider identifier (e.g., 'google-ai', 'openai')
41
+ * @param handler - TTS handler implementation
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const googleHandler: TTSHandler = {
46
+ * synthesize: async (text, options) => { ... },
47
+ * getVoices: async (languageCode) => { ... },
48
+ * isConfigured: () => true
49
+ * };
50
+ *
51
+ * TTSProcessor.registerHandler('google-ai', googleHandler);
52
+ * ```
53
+ */
54
+ static registerHandler(providerName, handler) {
55
+ if (!providerName) {
56
+ throw new Error("Provider name is required");
57
+ }
58
+ if (!handler) {
59
+ throw new Error("Handler is required");
60
+ }
61
+ const normalizedName = providerName.toLowerCase();
62
+ if (this.handlers.has(normalizedName)) {
63
+ logger.warn(`[TTSProcessor] Overwriting existing handler for provider: ${normalizedName}`);
64
+ }
65
+ this.handlers.set(normalizedName, handler);
66
+ logger.debug(`[TTSProcessor] Registered TTS handler for provider: ${normalizedName}`);
67
+ }
68
+ /**
69
+ * Get a registered TTS handler by provider name
70
+ *
71
+ * @private
72
+ * @param providerName - Provider identifier
73
+ * @returns Handler instance or undefined if not registered
74
+ */
75
+ static getHandler(providerName) {
76
+ const normalizedName = providerName.toLowerCase();
77
+ return this.handlers.get(normalizedName);
78
+ }
79
+ /**
80
+ * Check if a provider is supported (has a registered TTS handler)
81
+ *
82
+ * @param providerName - Provider identifier
83
+ * @returns True if handler is registered
84
+ *
85
+ * @example
86
+ * ```typescript
87
+ * if (TTSProcessor.supports('google-ai')) {
88
+ * console.log('Google AI TTS is supported');
89
+ * }
90
+ * ```
91
+ */
92
+ static supports(providerName) {
93
+ if (!providerName) {
94
+ logger.error("[TTSProcessor] Provider name is required for supports check");
95
+ return false;
96
+ }
97
+ const normalizedName = providerName.toLowerCase();
98
+ const isSupported = this.handlers.has(normalizedName);
99
+ if (!isSupported) {
100
+ logger.debug(`[TTSProcessor] Provider ${providerName} is not supported`);
101
+ }
102
+ return isSupported;
103
+ }
104
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/neurolink",
3
- "version": "8.10.1",
3
+ "version": "8.12.0",
4
4
  "description": "Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and deploy AI applications with 9 major providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
5
5
  "author": {
6
6
  "name": "Juspay Technologies",
@@ -179,12 +179,15 @@
179
179
  "@opentelemetry/sdk-trace-base": "^2.1.0",
180
180
  "@opentelemetry/sdk-trace-node": "^2.1.0",
181
181
  "@opentelemetry/semantic-conventions": "^1.30.1",
182
+ "adm-zip": "^0.5.16",
182
183
  "ai": "4.3.16",
183
184
  "chalk": "^5.6.2",
184
185
  "csv-parser": "^3.2.0",
185
186
  "dotenv": "^16.6.1",
187
+ "exceljs": "^4.4.0",
186
188
  "inquirer": "^9.3.7",
187
189
  "json-schema-to-zod": "^2.6.1",
190
+ "mammoth": "^1.11.0",
188
191
  "mathjs": "^14.7.0",
189
192
  "mem0ai": "^2.1.38",
190
193
  "nanoid": "^5.1.5",
@@ -197,6 +200,7 @@
197
200
  "undici": "^7.5.0",
198
201
  "uuid": "^11.1.0",
199
202
  "ws": "^8.18.3",
203
+ "xml2js": "^0.6.2",
200
204
  "yargs": "^17.7.2",
201
205
  "zod": "^3.22.0",
202
206
  "zod-to-json-schema": "^3.24.6"
@@ -220,11 +224,13 @@
220
224
  "@sveltejs/kit": "^2.38.1",
221
225
  "@sveltejs/package": "^2.5.0",
222
226
  "@sveltejs/vite-plugin-svelte": "^5.1.1",
227
+ "@types/adm-zip": "^0.5.7",
223
228
  "@types/cors": "^2.8.19",
224
229
  "@types/express": "^5.0.3",
225
230
  "@types/inquirer": "^9.0.9",
226
231
  "@types/node": "^20.19.13",
227
232
  "@types/ws": "^8.18.1",
233
+ "@types/xml2js": "^0.4.14",
228
234
  "@types/yargs": "^17.0.33",
229
235
  "@typescript-eslint/eslint-plugin": "^8.43.0",
230
236
  "@typescript-eslint/parser": "^8.43.0",