@juspay/neurolink 1.11.3 → 2.0.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 +12 -0
- package/README.md +32 -16
- package/dist/cli/index.js +60 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
# [2.0.0](https://github.com/juspay/neurolink/compare/v1.11.3...v2.0.0) (2025-06-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **cli:** add command variations and stream agent support ([5fc4c26](https://github.com/juspay/neurolink/commit/5fc4c26b23bd189be52272521bdd2ca40dd55837))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* **cli:** 'generate-text' command is deprecated and will be removed in v2.0
|
|
12
|
+
|
|
1
13
|
## [1.11.3](https://github.com/juspay/neurolink/compare/v1.11.2...v1.11.3) (2025-06-22)
|
|
2
14
|
|
|
3
15
|
|
package/README.md
CHANGED
|
@@ -18,13 +18,19 @@
|
|
|
18
18
|
✅ **Function Calling Ready**: AI can now execute real filesystem operations, data analysis, and system commands
|
|
19
19
|
✅ **Production Validated**: 23,230+ token MCP context loading confirmed via comprehensive CLI testing
|
|
20
20
|
✅ **Zero Build Errors**: Clean TypeScript compilation after resolving all 13 blocking errors
|
|
21
|
-
✅ **CLI Tool Integration**: Both `generate
|
|
21
|
+
✅ **CLI Tool Integration**: Both `generate`/`gen` and `agent-generate` commands use full MCP capabilities
|
|
22
22
|
✅ **Backward Compatible**: Tools enabled by default with opt-out flag for traditional usage
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
|
-
# NEW: AI can now access your filesystem and execute tools
|
|
25
|
+
# NEW: AI can now access your filesystem and execute tools (use preferred commands)
|
|
26
|
+
npx @juspay/neurolink generate "List files in this directory" --provider google-ai
|
|
27
|
+
|
|
28
|
+
# Alternative shorter command
|
|
29
|
+
npx @juspay/neurolink gen "List files in this directory" --provider google-ai
|
|
30
|
+
|
|
31
|
+
# ⚠️ DEPRECATED: generate-text will be removed in v2.0 (use 'generate' or 'gen' instead)
|
|
32
|
+
# This command shows a deprecation warning and is kept for backward compatibility only
|
|
26
33
|
npx @juspay/neurolink generate-text "List files in this directory" --provider google-ai
|
|
27
|
-
# Result: AI uses listDirectory tool and returns actual file listing
|
|
28
34
|
```
|
|
29
35
|
|
|
30
36
|
## 🚀 Quick Start
|
|
@@ -36,7 +42,8 @@ npx @juspay/neurolink generate-text "List files in this directory" --provider go
|
|
|
36
42
|
export GOOGLE_AI_API_KEY="AIza-your-google-ai-api-key"
|
|
37
43
|
|
|
38
44
|
# CLI - No installation required
|
|
39
|
-
npx @juspay/neurolink generate
|
|
45
|
+
npx @juspay/neurolink generate "Hello, AI"
|
|
46
|
+
npx @juspay/neurolink gen "Hello, AI" # Shortest form
|
|
40
47
|
npx @juspay/neurolink status
|
|
41
48
|
```
|
|
42
49
|
|
|
@@ -106,12 +113,16 @@ npx @juspay/neurolink status
|
|
|
106
113
|
|
|
107
114
|
```bash
|
|
108
115
|
# Test built-in tools (works immediately)
|
|
109
|
-
npx @juspay/neurolink generate
|
|
110
|
-
|
|
116
|
+
npx @juspay/neurolink generate "What time is it?" --debug
|
|
117
|
+
|
|
118
|
+
# Alternative short form
|
|
119
|
+
npx @juspay/neurolink gen "What time is it?" --debug
|
|
111
120
|
|
|
112
121
|
# Test tool discovery
|
|
113
|
-
npx @juspay/neurolink generate
|
|
114
|
-
|
|
122
|
+
npx @juspay/neurolink generate "What tools do you have access to?" --debug
|
|
123
|
+
|
|
124
|
+
# Alternative short form
|
|
125
|
+
npx @juspay/neurolink gen "What tools do you have access to?" --debug
|
|
115
126
|
|
|
116
127
|
# Test external server discovery
|
|
117
128
|
npx @juspay/neurolink mcp discover --format table
|
|
@@ -134,13 +145,13 @@ NeuroLink now features a revolutionary dynamic model configuration system that e
|
|
|
134
145
|
|
|
135
146
|
```bash
|
|
136
147
|
# Cost optimization - automatically use cheapest model
|
|
137
|
-
npx @juspay/neurolink generate
|
|
148
|
+
npx @juspay/neurolink generate "Hello" --optimize-cost
|
|
138
149
|
|
|
139
150
|
# Capability search - find models with specific features
|
|
140
|
-
npx @juspay/neurolink generate
|
|
151
|
+
npx @juspay/neurolink generate "Describe this image" --capability vision
|
|
141
152
|
|
|
142
153
|
# Model aliases - use friendly names
|
|
143
|
-
npx @juspay/neurolink
|
|
154
|
+
npx @juspay/neurolink gen "Write code" --model best-coding
|
|
144
155
|
|
|
145
156
|
# Test dynamic model server
|
|
146
157
|
npm run model-server # Starts config server on localhost:3001
|
|
@@ -163,14 +174,19 @@ npm run test:dynamic-models # Comprehensive test suite
|
|
|
163
174
|
|
|
164
175
|
```bash
|
|
165
176
|
# Text generation with automatic MCP tool detection (default)
|
|
166
|
-
npx @juspay/neurolink generate
|
|
167
|
-
|
|
177
|
+
npx @juspay/neurolink generate "What time is it?"
|
|
178
|
+
|
|
179
|
+
# Alternative short form
|
|
180
|
+
npx @juspay/neurolink gen "What time is it?"
|
|
168
181
|
|
|
169
182
|
# Disable tools for training-data-only responses
|
|
170
|
-
npx @juspay/neurolink generate
|
|
183
|
+
npx @juspay/neurolink generate "What time is it?" --disable-tools
|
|
184
|
+
|
|
185
|
+
# Real-time streaming with agent support (default)
|
|
186
|
+
npx @juspay/neurolink stream "What time is it?"
|
|
171
187
|
|
|
172
|
-
#
|
|
173
|
-
npx @juspay/neurolink stream "Tell me a story
|
|
188
|
+
# Streaming without tools (traditional mode)
|
|
189
|
+
npx @juspay/neurolink stream "Tell me a story" --disable-tools
|
|
174
190
|
|
|
175
191
|
# Provider diagnostics
|
|
176
192
|
npx @juspay/neurolink status --verbose
|
package/dist/cli/index.js
CHANGED
|
@@ -204,7 +204,7 @@ const cli = yargs(args)
|
|
|
204
204
|
exitProcess(); // Default exit
|
|
205
205
|
})
|
|
206
206
|
// Generate Text Command
|
|
207
|
-
.command(["generate-text <prompt>", "generate <prompt>"], "Generate text using AI providers", (yargsInstance) => yargsInstance
|
|
207
|
+
.command(["generate-text <prompt>", "generate <prompt>", "gen <prompt>"], "Generate text using AI providers", (yargsInstance) => yargsInstance
|
|
208
208
|
.usage("Usage: $0 generate-text <prompt> [options]")
|
|
209
209
|
.positional("prompt", {
|
|
210
210
|
type: "string",
|
|
@@ -266,6 +266,11 @@ const cli = yargs(args)
|
|
|
266
266
|
.example('$0 generate-text "Write a story" --provider openai', "Use specific provider")
|
|
267
267
|
.example('$0 generate-text "What time is it?"', "Use with natural tool integration (default)")
|
|
268
268
|
.example('$0 generate-text "Hello world" --disable-tools', "Use without tool integration"), async (argv) => {
|
|
269
|
+
// Check if generate-text was used specifically (for deprecation warning)
|
|
270
|
+
const usedCommand = argv._[0];
|
|
271
|
+
if (usedCommand === 'generate-text' && !argv.quiet) {
|
|
272
|
+
console.warn(chalk.yellow('⚠️ Warning: "generate-text" is deprecated. Use "generate" or "gen" instead for multimodal support.'));
|
|
273
|
+
}
|
|
269
274
|
let originalConsole = {};
|
|
270
275
|
if (argv.format === "json" && !argv.quiet) {
|
|
271
276
|
// Suppress only if not quiet, as quiet implies no spinners anyway
|
|
@@ -437,7 +442,14 @@ const cli = yargs(args)
|
|
|
437
442
|
default: false,
|
|
438
443
|
description: "Enable debug mode with interleaved logging",
|
|
439
444
|
})
|
|
440
|
-
.
|
|
445
|
+
.option("disable-tools", {
|
|
446
|
+
type: "boolean",
|
|
447
|
+
default: false,
|
|
448
|
+
description: "Disable MCP tool integration (tools enabled by default)",
|
|
449
|
+
})
|
|
450
|
+
.example('$0 stream "Tell me a story"', "Stream a story in real-time")
|
|
451
|
+
.example('$0 stream "What time is it?"', "Stream with natural tool integration (default)")
|
|
452
|
+
.example('$0 stream "Tell me a story" --disable-tools', "Stream without tool integration"), async (argv) => {
|
|
441
453
|
// Default mode: Simple streaming message
|
|
442
454
|
// Debug mode: More detailed information
|
|
443
455
|
if (!argv.quiet && !argv.debug) {
|
|
@@ -447,13 +459,52 @@ const cli = yargs(args)
|
|
|
447
459
|
console.log(chalk.blue(`🔄 Streaming from ${argv.provider} provider with debug logging...\n`));
|
|
448
460
|
}
|
|
449
461
|
try {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
: argv.
|
|
455
|
-
|
|
456
|
-
|
|
462
|
+
let stream;
|
|
463
|
+
if (argv.disableTools === true) {
|
|
464
|
+
// Tools disabled - use standard SDK
|
|
465
|
+
stream = await sdk.generateTextStream({
|
|
466
|
+
prompt: argv.prompt,
|
|
467
|
+
provider: argv.provider === "auto"
|
|
468
|
+
? undefined
|
|
469
|
+
: argv.provider,
|
|
470
|
+
temperature: argv.temperature,
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
// Tools enabled - use AgentEnhancedProvider for streaming tool calls
|
|
475
|
+
// Map provider to supported AgentEnhancedProvider types
|
|
476
|
+
const supportedProvider = (() => {
|
|
477
|
+
switch (argv.provider) {
|
|
478
|
+
case "openai":
|
|
479
|
+
case "anthropic":
|
|
480
|
+
case "google-ai":
|
|
481
|
+
return argv.provider;
|
|
482
|
+
case "auto":
|
|
483
|
+
default:
|
|
484
|
+
return "google-ai"; // Default to google-ai for best tool support
|
|
485
|
+
}
|
|
486
|
+
})();
|
|
487
|
+
const agentProvider = new AgentEnhancedProvider({
|
|
488
|
+
provider: supportedProvider,
|
|
489
|
+
model: undefined, // Use default model for provider
|
|
490
|
+
toolCategory: "all", // Enable all tool categories
|
|
491
|
+
});
|
|
492
|
+
// Note: AgentEnhancedProvider doesn't support streaming with tools yet
|
|
493
|
+
// Fall back to generateText for now
|
|
494
|
+
const result = await agentProvider.generateText(argv.prompt);
|
|
495
|
+
// Simulate streaming by outputting the result
|
|
496
|
+
const text = result?.text || "";
|
|
497
|
+
const CHUNK_SIZE = 10;
|
|
498
|
+
const DELAY_MS = 50;
|
|
499
|
+
for (let i = 0; i < text.length; i += CHUNK_SIZE) {
|
|
500
|
+
process.stdout.write(text.slice(i, i + CHUNK_SIZE));
|
|
501
|
+
await new Promise(resolve => setTimeout(resolve, DELAY_MS)); // Small delay
|
|
502
|
+
}
|
|
503
|
+
if (!argv.quiet) {
|
|
504
|
+
process.stdout.write("\n");
|
|
505
|
+
}
|
|
506
|
+
return; // Exit early for agent mode
|
|
507
|
+
}
|
|
457
508
|
for await (const chunk of stream) {
|
|
458
509
|
process.stdout.write(chunk.content);
|
|
459
510
|
// In debug mode, interleaved logging would appear here
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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",
|