@juspay/neurolink 1.2.4 โ†’ 1.3.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 ADDED
@@ -0,0 +1,108 @@
1
+ # @juspay/neurolink
2
+
3
+ ## 1.4.0
4
+
5
+ ### Major Changes
6
+
7
+ - **๐Ÿ“š MCP Documentation Master Plan**: Complete external server connectivity documentation
8
+ - **๐Ÿ”ง MCP Integration Guide**: 400+ line comprehensive setup and usage guide
9
+ - **๐Ÿ“– CLI Documentation**: Complete MCP commands section with workflows
10
+ - **๐Ÿงช Demo Integration**: 5 MCP API endpoints for testing and demonstration
11
+ - **โš™๏ธ Configuration Templates**: .env.example and .mcp-servers.example.json
12
+ - **๐Ÿ“‹ API Reference**: Complete MCP API documentation with examples
13
+
14
+ ### Features
15
+
16
+ - **External Server Connectivity**: Full MCP (Model Context Protocol) support
17
+ - **65+ Compatible Servers**: Filesystem, GitHub, databases, web browsing, search
18
+ - **Professional CLI**: Complete server lifecycle management
19
+ - **Demo Server Integration**: Live MCP API endpoints
20
+ - **Configuration Management**: Templates and examples for all deployment scenarios
21
+
22
+ ### MCP Server Support
23
+
24
+ ```bash
25
+ # Install and manage external servers
26
+ neurolink mcp install filesystem
27
+ neurolink mcp install github
28
+ neurolink mcp test filesystem
29
+ neurolink mcp list --status
30
+ neurolink mcp execute filesystem read_file --path="/path/to/file"
31
+ ```
32
+
33
+ ### MCP API Endpoints
34
+
35
+ ```typescript
36
+ // Demo server includes 5 MCP endpoints
37
+ GET /api/mcp/servers # List configured servers
38
+ POST /api/mcp/test/:server # Test server connectivity
39
+ GET /api/mcp/tools/:server # Get available tools
40
+ POST /api/mcp/execute # Execute MCP tools
41
+ POST /api/mcp/install/:server # Install new servers
42
+ ```
43
+
44
+ ### Documentation Updates
45
+
46
+ - **README.md**: Complete MCP section with real-world examples
47
+ - **docs/MCP-INTEGRATION.md**: 400+ line comprehensive MCP guide
48
+ - **docs/CLI-GUIDE.md**: MCP commands section with workflow examples
49
+ - **docs/API-REFERENCE.md**: Complete MCP API documentation
50
+ - **docs/README.md**: Updated documentation index with MCP references
51
+
52
+ ### Configuration
53
+
54
+ - **.env.example**: MCP environment variables section
55
+ - **.mcp-servers.example.json**: Complete server configuration template
56
+ - **package.json**: Updated description highlighting MCP capabilities
57
+
58
+ ### Breaking Changes
59
+
60
+ - None - 100% backward compatibility maintained
61
+
62
+ ## 1.3.0
63
+
64
+ ### Major Changes
65
+
66
+ - **๐ŸŽ‰ MCP Foundation (Model Context Protocol)**: NeuroLink transforms from AI SDK to Universal AI Development Platform
67
+ - **๐Ÿญ MCP Server Factory**: Lighthouse-compatible server creation with `createMCPServer()`
68
+ - **๐Ÿง  Context Management**: Rich context with 15+ fields + tool chain tracking
69
+ - **๐Ÿ“‹ Tool Registry**: Discovery, registration, execution + statistics
70
+ - **๐ŸŽผ Tool Orchestration**: Single tools + sequential pipelines + error handling
71
+ - **๐Ÿค– AI Provider Integration**: Core AI tools with schema validation
72
+ - **๐Ÿ”— Integration Tests**: 27/27 tests passing (100% success rate)
73
+
74
+ ### Features
75
+
76
+ - **Factory-First Architecture**: MCP tools work internally, users see simple factory methods
77
+ - **Lighthouse Compatible**: 99% compatible with existing Lighthouse MCP patterns
78
+ - **Enterprise Ready**: Rich context, permissions, tool orchestration, analytics
79
+ - **Production Tested**: <1ms tool execution, comprehensive error handling
80
+
81
+ ### Performance
82
+
83
+ - **Test Execution**: 1.23s for 27 comprehensive tests
84
+ - **Tool Execution**: 0-11ms per tool (well under 100ms target)
85
+ - **Pipeline Performance**: 22ms for 2-step sequential pipeline
86
+ - **Memory Efficiency**: Clean context management with automatic cleanup
87
+
88
+ ### Technical Implementation
89
+
90
+ ```typescript
91
+ src/lib/mcp/
92
+ โ”œโ”€โ”€ factory.ts # createMCPServer() - Lighthouse compatible
93
+ โ”œโ”€โ”€ context-manager.ts # Rich context (15+ fields) + tool chain tracking
94
+ โ”œโ”€โ”€ registry.ts # Tool discovery, registration, execution + statistics
95
+ โ”œโ”€โ”€ orchestrator.ts # Single tools + sequential pipelines + error handling
96
+ โ””โ”€โ”€ servers/ai-providers/ # AI Core Server with 3 tools integrated
97
+ โ””โ”€โ”€ ai-core-server.ts # generate-text, select-provider, check-provider-status
98
+ ```
99
+
100
+ ### Breaking Changes
101
+
102
+ - None - 100% backward compatibility maintained
103
+
104
+ ## 1.2.4
105
+
106
+ ### Patch Changes
107
+
108
+ - 95d8ee6: Set up automated version bumping and publishing workflow with changesets integration
package/README.md CHANGED
@@ -4,10 +4,42 @@
4
4
  [![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
7
- > Production-ready AI toolkit with multi-provider support, automatic fallback, and full TypeScript integration. **Now with a professional CLI!**
7
+ > Production-ready AI toolkit with multi-provider support, automatic fallback, and full TypeScript integration. **Now with MCP Foundation and professional CLI!**
8
8
 
9
9
  **NeuroLink** provides a unified interface for AI providers (OpenAI, Amazon Bedrock, Google Vertex AI) with intelligent fallback, streaming support, and type-safe APIs. Available as both a **programmatic SDK** and a **professional CLI tool**. Extracted from production use at Juspay.
10
10
 
11
+ ## ๐ŸŽ‰ **NEW: MCP Foundation (Model Context Protocol)**
12
+
13
+ **NeuroLink v1.3.0** introduces a groundbreaking **MCP Foundation** that transforms NeuroLink from an AI SDK into a **Universal AI Development Platform** while maintaining the simple factory method interface.
14
+
15
+ ### **๐Ÿ† Phase 1 Complete: 27/27 Tests Passing**
16
+ - โœ… **Factory-First Architecture**: MCP tools work internally, users see simple factory methods
17
+ - โœ… **MCP Compatible**: 99% compatible with existing MCP tools and servers
18
+ - โœ… **Enterprise Ready**: Rich context, permissions, tool orchestration, analytics
19
+ - โœ… **Production Tested**: <1ms tool execution, comprehensive error handling
20
+
21
+ ### **๐Ÿš€ What This Means for You**
22
+ ```typescript
23
+ // Same simple interface you love
24
+ const result = await provider.generateText("Create a React component");
25
+
26
+ // But now powered by enterprise-grade MCP tool orchestration internally:
27
+ // - Context tracking across tool chains
28
+ // - Permission-based security
29
+ // - Tool registry and discovery
30
+ // - Pipeline execution with error recovery
31
+ // - Rich analytics and monitoring
32
+ ```
33
+
34
+ ### **๐Ÿ”ง MCP Architecture**
35
+ - **๐Ÿญ MCP Server Factory**: Standard MCP-compatible server creation
36
+ - **๐Ÿง  Context Management**: Rich context with 15+ fields + tool chain tracking
37
+ - **๐Ÿ“‹ Tool Registry**: Discovery, registration, execution + statistics
38
+ - **๐ŸŽผ Tool Orchestration**: Single tools + sequential pipelines + error handling
39
+ - **๐Ÿค– AI Provider Integration**: Core AI tools with schema validation
40
+
41
+ **Ready for Phase 2**: MCP tool migration enabling unlimited extensibility while preserving the simple interface developers love.
42
+
11
43
  ## ๐Ÿš€ Quick Start
12
44
 
13
45
  ### ๐Ÿ“ฆ Installation
@@ -88,11 +120,11 @@ npx @juspay/neurolink status
88
120
  | **Analytics & Monitoring** | ![Monitoring](./neurolink-demo/screenshots/06-monitoring/06-monitoring-analytics-2025-06-04T14-00-08-919Z.png) | Real-time provider analytics |
89
121
 
90
122
  #### **๐ŸŽฅ Complete Demo Videos** *(Real AI generation showing SDK use cases)*
91
- - **[Basic Examples](./neurolink-demo/videos/basic-examples.webm)** - Core SDK functionality: text generation, streaming, provider selection, status checks
92
- - **[Business Use Cases](./neurolink-demo/videos/business-use-cases.webm)** - Professional applications: marketing emails, quarterly data analysis, executive summaries
93
- - **[Creative Tools](./neurolink-demo/videos/creative-tools.webm)** - Content creation: storytelling, translation, blog post ideas
94
- - **[Developer Tools](./neurolink-demo/videos/developer-tools.webm)** - Technical applications: React components, API documentation, error debugging
95
- - **[Monitoring & Analytics](./neurolink-demo/videos/monitoring-analytics.webm)** - SDK features: performance benchmarks, provider fallback, structured data generation
123
+ - **[Basic Examples WebM](./neurolink-demo/videos/basic-examples.webm) | [MP4](./neurolink-demo/videos/basic-examples.mp4)** - Core SDK functionality: text generation, streaming, provider selection, status checks
124
+ - **[Business Use Cases WebM](./neurolink-demo/videos/business-use-cases.webm) | [MP4](./neurolink-demo/videos/business-use-cases.mp4)** - Professional applications: marketing emails, quarterly data analysis, executive summaries
125
+ - **[Creative Tools WebM](./neurolink-demo/videos/creative-tools.webm) | [MP4](./neurolink-demo/videos/creative-tools.mp4)** - Content creation: storytelling, translation, blog post ideas
126
+ - **[Developer Tools WebM](./neurolink-demo/videos/developer-tools.webm) | [MP4](./neurolink-demo/videos/developer-tools.mp4)** - Technical applications: React components, API documentation, error debugging
127
+ - **[Monitoring & Analytics WebM](./neurolink-demo/videos/monitoring-analytics.webm) | [MP4](./neurolink-demo/videos/monitoring-analytics.mp4)** - SDK features: performance benchmarks, provider fallback, structured data generation
96
128
 
97
129
  **Available formats:**
98
130
  - **WebM** (web-optimized): All videos available as `.webm` for web embedding
@@ -100,21 +132,42 @@ npx @juspay/neurolink status
100
132
 
101
133
  ### ๐Ÿ–ฅ๏ธ CLI Tool Screenshots & Videos
102
134
 
103
- #### **๐Ÿ“ธ Professional CLI Screenshots**
135
+ #### **๐Ÿ“ธ Professional CLI Screenshots** *(Latest: June 8, 2025)*
136
+ | Command | Screenshot | Description |
137
+ |---------|------------|-------------|
138
+ | **CLI Help Overview** | ![CLI Help](./docs/visual-content/screenshots/cli-screenshots/01-cli-help-2025-06-10T12-00-00.png) | Complete command reference |
139
+ | **Provider Status Check** | ![Provider Status](./docs/visual-content/screenshots/cli-screenshots/02-provider-status-2025-06-10T12-00-00.png) | All provider connectivity verified |
140
+ | **Text Generation** | ![Text Generation](./docs/visual-content/screenshots/cli-screenshots/03-text-generation-2025-06-10T12-00-00.png) | Real AI haiku generation with JSON |
141
+ | **Auto Provider Selection** | ![Best Provider](./docs/visual-content/screenshots/cli-screenshots/04-best-provider-2025-06-10T12-00-00.png) | Automatic provider selection working |
142
+ | **Batch Processing** | ![Batch Results](./docs/visual-content/screenshots/cli-screenshots/05-batch-results-2025-06-10T12-00-00.png) | Multi-prompt processing with results |
143
+
144
+ #### **๐ŸŽฅ CLI Demonstration Videos** *(Professional H.264 MP4 format)*
145
+ - **[CLI Help & Overview](./docs/visual-content/cli-videos/cli-help.mp4)** (44KB) - Complete command reference and usage examples
146
+ - **[Provider Status Check](./docs/visual-content/cli-videos/cli-provider-status.mp4)** (496KB) - Connectivity testing and response time measurement
147
+ - **[Text Generation](./docs/visual-content/cli-videos/cli-text-generation.mp4)** (100KB) - Real AI content generation with different providers
148
+ - **[MCP Command Help](./docs/visual-content/cli-videos/mcp-help.mp4)** (36KB) - MCP server management commands
149
+ - **[MCP Server Listing](./docs/visual-content/cli-videos/mcp-list.mp4)** (16KB) - MCP server discovery and status
150
+
151
+ ### ๐Ÿ”ง MCP (Model Context Protocol) Visual Documentation
152
+
153
+ #### **๐Ÿ“ธ MCP CLI Screenshots** *(Generated Jan 10, 2025)*
104
154
  | Command | Screenshot | Description |
105
155
  |---------|------------|-------------|
106
- | **CLI Help Overview** | ![CLI Help](./docs/visual-content/screenshots/cli-screenshots/01-cli-help-2025-06-04T19-38-12.png) | Complete command reference |
107
- | **Provider Status Check** | ![Provider Status](./docs/visual-content/screenshots/cli-screenshots/02-provider-status-2025-06-04T19-38-25.png) | All provider connectivity verified |
108
- | **Text Generation** | ![Text Generation](./docs/visual-content/screenshots/cli-screenshots/03-text-generation-2025-06-04T19-38-30.png) | Real AI haiku generation with JSON |
109
- | **Auto Provider Selection** | ![Best Provider](./docs/visual-content/screenshots/cli-screenshots/04-best-provider-2025-06-04T19-38-33.png) | Automatic provider selection working |
110
- | **Batch Processing** | ![Batch Results](./docs/visual-content/screenshots/cli-screenshots/05-batch-results-2025-06-04T19-38-37.png) | Multi-prompt processing with results |
111
-
112
- #### **๐ŸŽฅ CLI Demonstration Videos** *(Real command execution)*
113
- - **[CLI Overview](./docs/visual-content/videos/cli-videos/cli-overview/)** - Help, status, provider selection commands
114
- - **[Basic Generation](./docs/visual-content/videos/cli-videos/cli-basic-generation/)** - Text generation with different providers
115
- - **[Batch Processing](./docs/visual-content/videos/cli-videos/cli-batch-processing/)** - File-based multi-prompt processing
116
- - **[Real-time Streaming](./docs/visual-content/videos/cli-videos/cli-streaming/)** - Live AI content streaming
117
- - **[Advanced Features](./docs/visual-content/videos/cli-videos/cli-advanced-features/)** - Verbose diagnostics and provider options
156
+ | **MCP Help Overview** | ![MCP Help](./docs/visual-content/screenshots/mcp-cli/01-mcp-help-2025-06-10.png) | Complete MCP command reference |
157
+ | **Server Installation** | ![Install Server](./docs/visual-content/screenshots/mcp-cli/02-mcp-install-2025-06-10.png) | Installing external MCP servers |
158
+ | **Server Status Check** | ![Server Status](./docs/visual-content/screenshots/mcp-cli/03-mcp-list-status-2025-06-10.png) | MCP server connectivity and status |
159
+ | **Server Testing** | ![Test Server](./docs/visual-content/screenshots/mcp-cli/04-mcp-test-server-2025-06-10.png) | Testing MCP server connectivity |
160
+ | **Custom Server Setup** | ![Custom Server](./docs/visual-content/screenshots/mcp-cli/05-mcp-custom-server-2025-06-10.png) | Adding custom MCP server configurations |
161
+ | **Workflow Integration** | ![Workflow Demo](./docs/visual-content/screenshots/mcp-cli/06-mcp-workflow-demo-2025-06-10.png) | Complete MCP workflow demonstrations |
162
+
163
+ #### **๐ŸŽฅ MCP Demo Videos** *(Real MCP server integration)*
164
+ - **[Server Management WebM](./neurolink-demo/videos/mcp-demos/mcp-server-management-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-server-management-demo.mp4)** - Installing, configuring, and testing MCP servers (~45s)
165
+ - **[Tool Execution WebM](./neurolink-demo/videos/mcp-demos/mcp-tool-execution-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-tool-execution-demo.mp4)** - Executing tools from external MCP servers (~60s)
166
+ - **[Workflow Integration WebM](./neurolink-demo/videos/mcp-demos/mcp-workflow-integration-demo.webm) | [MP4](./neurolink-demo/videos/mcp-demos/mcp-workflow-integration-demo.mp4)** - Complete workflow using multiple MCP servers (~90s)
167
+
168
+ **MCP Documentation**: All MCP visual content demonstrates real external server integration and tool execution capabilities.
169
+
170
+ **Video Quality**: All CLI videos now use professional H.264 encoding with universal compatibility across platforms and documentation systems.
118
171
 
119
172
  ### ๐Ÿ’ป Live Interactive Demo
120
173
  - **Working Express.js server** with real API integration
@@ -0,0 +1,373 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * NeuroLink CLI Configuration Management
4
+ *
5
+ * Enhanced configuration system with interactive setup,
6
+ * multi-profile support, and smart validation.
7
+ */
8
+ import { z } from 'zod';
9
+ declare const ConfigSchema: z.ZodObject<{
10
+ defaultProvider: z.ZodDefault<z.ZodEnum<["auto", "openai", "bedrock", "vertex", "anthropic", "azure", "huggingface"]>>;
11
+ providers: z.ZodDefault<z.ZodObject<{
12
+ openai: z.ZodOptional<z.ZodObject<{
13
+ apiKey: z.ZodOptional<z.ZodString>;
14
+ model: z.ZodDefault<z.ZodString>;
15
+ baseURL: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ model: string;
18
+ apiKey?: string | undefined;
19
+ baseURL?: string | undefined;
20
+ }, {
21
+ apiKey?: string | undefined;
22
+ model?: string | undefined;
23
+ baseURL?: string | undefined;
24
+ }>>;
25
+ bedrock: z.ZodOptional<z.ZodObject<{
26
+ region: z.ZodOptional<z.ZodString>;
27
+ accessKeyId: z.ZodOptional<z.ZodString>;
28
+ secretAccessKey: z.ZodOptional<z.ZodString>;
29
+ sessionToken: z.ZodOptional<z.ZodString>;
30
+ model: z.ZodDefault<z.ZodString>;
31
+ }, "strip", z.ZodTypeAny, {
32
+ model: string;
33
+ region?: string | undefined;
34
+ accessKeyId?: string | undefined;
35
+ secretAccessKey?: string | undefined;
36
+ sessionToken?: string | undefined;
37
+ }, {
38
+ model?: string | undefined;
39
+ region?: string | undefined;
40
+ accessKeyId?: string | undefined;
41
+ secretAccessKey?: string | undefined;
42
+ sessionToken?: string | undefined;
43
+ }>>;
44
+ vertex: z.ZodOptional<z.ZodObject<{
45
+ projectId: z.ZodOptional<z.ZodString>;
46
+ location: z.ZodDefault<z.ZodString>;
47
+ credentials: z.ZodOptional<z.ZodString>;
48
+ serviceAccountKey: z.ZodOptional<z.ZodString>;
49
+ clientEmail: z.ZodOptional<z.ZodString>;
50
+ privateKey: z.ZodOptional<z.ZodString>;
51
+ model: z.ZodDefault<z.ZodString>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ model: string;
54
+ location: string;
55
+ projectId?: string | undefined;
56
+ credentials?: string | undefined;
57
+ serviceAccountKey?: string | undefined;
58
+ clientEmail?: string | undefined;
59
+ privateKey?: string | undefined;
60
+ }, {
61
+ model?: string | undefined;
62
+ projectId?: string | undefined;
63
+ location?: string | undefined;
64
+ credentials?: string | undefined;
65
+ serviceAccountKey?: string | undefined;
66
+ clientEmail?: string | undefined;
67
+ privateKey?: string | undefined;
68
+ }>>;
69
+ anthropic: z.ZodOptional<z.ZodObject<{
70
+ apiKey: z.ZodOptional<z.ZodString>;
71
+ model: z.ZodDefault<z.ZodString>;
72
+ }, "strip", z.ZodTypeAny, {
73
+ model: string;
74
+ apiKey?: string | undefined;
75
+ }, {
76
+ apiKey?: string | undefined;
77
+ model?: string | undefined;
78
+ }>>;
79
+ azure: z.ZodOptional<z.ZodObject<{
80
+ apiKey: z.ZodOptional<z.ZodString>;
81
+ endpoint: z.ZodOptional<z.ZodString>;
82
+ deploymentId: z.ZodOptional<z.ZodString>;
83
+ model: z.ZodDefault<z.ZodString>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ model: string;
86
+ apiKey?: string | undefined;
87
+ endpoint?: string | undefined;
88
+ deploymentId?: string | undefined;
89
+ }, {
90
+ apiKey?: string | undefined;
91
+ model?: string | undefined;
92
+ endpoint?: string | undefined;
93
+ deploymentId?: string | undefined;
94
+ }>>;
95
+ huggingface: z.ZodOptional<z.ZodObject<{
96
+ apiKey: z.ZodOptional<z.ZodString>;
97
+ model: z.ZodDefault<z.ZodString>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ model: string;
100
+ apiKey?: string | undefined;
101
+ }, {
102
+ apiKey?: string | undefined;
103
+ model?: string | undefined;
104
+ }>>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ openai?: {
107
+ model: string;
108
+ apiKey?: string | undefined;
109
+ baseURL?: string | undefined;
110
+ } | undefined;
111
+ bedrock?: {
112
+ model: string;
113
+ region?: string | undefined;
114
+ accessKeyId?: string | undefined;
115
+ secretAccessKey?: string | undefined;
116
+ sessionToken?: string | undefined;
117
+ } | undefined;
118
+ vertex?: {
119
+ model: string;
120
+ location: string;
121
+ projectId?: string | undefined;
122
+ credentials?: string | undefined;
123
+ serviceAccountKey?: string | undefined;
124
+ clientEmail?: string | undefined;
125
+ privateKey?: string | undefined;
126
+ } | undefined;
127
+ anthropic?: {
128
+ model: string;
129
+ apiKey?: string | undefined;
130
+ } | undefined;
131
+ azure?: {
132
+ model: string;
133
+ apiKey?: string | undefined;
134
+ endpoint?: string | undefined;
135
+ deploymentId?: string | undefined;
136
+ } | undefined;
137
+ huggingface?: {
138
+ model: string;
139
+ apiKey?: string | undefined;
140
+ } | undefined;
141
+ }, {
142
+ openai?: {
143
+ apiKey?: string | undefined;
144
+ model?: string | undefined;
145
+ baseURL?: string | undefined;
146
+ } | undefined;
147
+ bedrock?: {
148
+ model?: string | undefined;
149
+ region?: string | undefined;
150
+ accessKeyId?: string | undefined;
151
+ secretAccessKey?: string | undefined;
152
+ sessionToken?: string | undefined;
153
+ } | undefined;
154
+ vertex?: {
155
+ model?: string | undefined;
156
+ projectId?: string | undefined;
157
+ location?: string | undefined;
158
+ credentials?: string | undefined;
159
+ serviceAccountKey?: string | undefined;
160
+ clientEmail?: string | undefined;
161
+ privateKey?: string | undefined;
162
+ } | undefined;
163
+ anthropic?: {
164
+ apiKey?: string | undefined;
165
+ model?: string | undefined;
166
+ } | undefined;
167
+ azure?: {
168
+ apiKey?: string | undefined;
169
+ model?: string | undefined;
170
+ endpoint?: string | undefined;
171
+ deploymentId?: string | undefined;
172
+ } | undefined;
173
+ huggingface?: {
174
+ apiKey?: string | undefined;
175
+ model?: string | undefined;
176
+ } | undefined;
177
+ }>>;
178
+ profiles: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>;
179
+ preferences: z.ZodDefault<z.ZodObject<{
180
+ outputFormat: z.ZodDefault<z.ZodEnum<["text", "json", "yaml"]>>;
181
+ temperature: z.ZodDefault<z.ZodNumber>;
182
+ maxTokens: z.ZodDefault<z.ZodNumber>;
183
+ enableLogging: z.ZodDefault<z.ZodBoolean>;
184
+ enableCaching: z.ZodDefault<z.ZodBoolean>;
185
+ cacheStrategy: z.ZodDefault<z.ZodEnum<["memory", "file", "redis"]>>;
186
+ }, "strip", z.ZodTypeAny, {
187
+ temperature: number;
188
+ maxTokens: number;
189
+ outputFormat: "text" | "json" | "yaml";
190
+ enableLogging: boolean;
191
+ enableCaching: boolean;
192
+ cacheStrategy: "file" | "memory" | "redis";
193
+ }, {
194
+ temperature?: number | undefined;
195
+ maxTokens?: number | undefined;
196
+ outputFormat?: "text" | "json" | "yaml" | undefined;
197
+ enableLogging?: boolean | undefined;
198
+ enableCaching?: boolean | undefined;
199
+ cacheStrategy?: "file" | "memory" | "redis" | undefined;
200
+ }>>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ defaultProvider: "auto" | "openai" | "bedrock" | "vertex" | "anthropic" | "azure" | "huggingface";
203
+ providers: {
204
+ openai?: {
205
+ model: string;
206
+ apiKey?: string | undefined;
207
+ baseURL?: string | undefined;
208
+ } | undefined;
209
+ bedrock?: {
210
+ model: string;
211
+ region?: string | undefined;
212
+ accessKeyId?: string | undefined;
213
+ secretAccessKey?: string | undefined;
214
+ sessionToken?: string | undefined;
215
+ } | undefined;
216
+ vertex?: {
217
+ model: string;
218
+ location: string;
219
+ projectId?: string | undefined;
220
+ credentials?: string | undefined;
221
+ serviceAccountKey?: string | undefined;
222
+ clientEmail?: string | undefined;
223
+ privateKey?: string | undefined;
224
+ } | undefined;
225
+ anthropic?: {
226
+ model: string;
227
+ apiKey?: string | undefined;
228
+ } | undefined;
229
+ azure?: {
230
+ model: string;
231
+ apiKey?: string | undefined;
232
+ endpoint?: string | undefined;
233
+ deploymentId?: string | undefined;
234
+ } | undefined;
235
+ huggingface?: {
236
+ model: string;
237
+ apiKey?: string | undefined;
238
+ } | undefined;
239
+ };
240
+ profiles: Record<string, any>;
241
+ preferences: {
242
+ temperature: number;
243
+ maxTokens: number;
244
+ outputFormat: "text" | "json" | "yaml";
245
+ enableLogging: boolean;
246
+ enableCaching: boolean;
247
+ cacheStrategy: "file" | "memory" | "redis";
248
+ };
249
+ }, {
250
+ defaultProvider?: "auto" | "openai" | "bedrock" | "vertex" | "anthropic" | "azure" | "huggingface" | undefined;
251
+ providers?: {
252
+ openai?: {
253
+ apiKey?: string | undefined;
254
+ model?: string | undefined;
255
+ baseURL?: string | undefined;
256
+ } | undefined;
257
+ bedrock?: {
258
+ model?: string | undefined;
259
+ region?: string | undefined;
260
+ accessKeyId?: string | undefined;
261
+ secretAccessKey?: string | undefined;
262
+ sessionToken?: string | undefined;
263
+ } | undefined;
264
+ vertex?: {
265
+ model?: string | undefined;
266
+ projectId?: string | undefined;
267
+ location?: string | undefined;
268
+ credentials?: string | undefined;
269
+ serviceAccountKey?: string | undefined;
270
+ clientEmail?: string | undefined;
271
+ privateKey?: string | undefined;
272
+ } | undefined;
273
+ anthropic?: {
274
+ apiKey?: string | undefined;
275
+ model?: string | undefined;
276
+ } | undefined;
277
+ azure?: {
278
+ apiKey?: string | undefined;
279
+ model?: string | undefined;
280
+ endpoint?: string | undefined;
281
+ deploymentId?: string | undefined;
282
+ } | undefined;
283
+ huggingface?: {
284
+ apiKey?: string | undefined;
285
+ model?: string | undefined;
286
+ } | undefined;
287
+ } | undefined;
288
+ profiles?: Record<string, any> | undefined;
289
+ preferences?: {
290
+ temperature?: number | undefined;
291
+ maxTokens?: number | undefined;
292
+ outputFormat?: "text" | "json" | "yaml" | undefined;
293
+ enableLogging?: boolean | undefined;
294
+ enableCaching?: boolean | undefined;
295
+ cacheStrategy?: "file" | "memory" | "redis" | undefined;
296
+ } | undefined;
297
+ }>;
298
+ export type NeuroLinkConfig = z.infer<typeof ConfigSchema>;
299
+ export declare class ConfigManager {
300
+ private configDir;
301
+ private configFile;
302
+ private config;
303
+ constructor();
304
+ /**
305
+ * Load configuration from file or create default
306
+ */
307
+ private loadConfig;
308
+ /**
309
+ * Save configuration to file
310
+ */
311
+ private saveConfig;
312
+ /**
313
+ * Interactive configuration setup
314
+ */
315
+ initInteractive(): Promise<void>;
316
+ /**
317
+ * Setup individual providers
318
+ */
319
+ private setupProviders;
320
+ /**
321
+ * Setup individual provider
322
+ */
323
+ private setupProvider;
324
+ /**
325
+ * OpenAI provider setup
326
+ */
327
+ private setupOpenAI;
328
+ /**
329
+ * Amazon Bedrock provider setup
330
+ */
331
+ private setupBedrock;
332
+ /**
333
+ * Google Vertex AI provider setup
334
+ */
335
+ private setupVertex;
336
+ /**
337
+ * Anthropic provider setup
338
+ */
339
+ private setupAnthropic;
340
+ /**
341
+ * Azure OpenAI provider setup
342
+ */
343
+ private setupAzure;
344
+ /**
345
+ * Hugging Face provider setup
346
+ */
347
+ private setupHuggingFace;
348
+ /**
349
+ * Get current configuration
350
+ */
351
+ getConfig(): NeuroLinkConfig;
352
+ /**
353
+ * Update configuration
354
+ */
355
+ updateConfig(updates: Partial<NeuroLinkConfig>): void;
356
+ /**
357
+ * Show current configuration
358
+ */
359
+ showConfig(): void;
360
+ /**
361
+ * Validate configuration
362
+ */
363
+ validateConfig(): {
364
+ valid: boolean;
365
+ errors: string[];
366
+ };
367
+ /**
368
+ * Reset configuration to defaults
369
+ */
370
+ resetConfig(): void;
371
+ }
372
+ export declare const configManager: ConfigManager;
373
+ export {};