@juspay/neurolink 8.1.0 → 8.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 +12 -0
- package/README.md +12 -3
- package/dist/cli/commands/setup-gcp.d.ts +1 -1
- package/dist/cli/commands/setup-gcp.js +6 -6
- package/dist/cli/loop/conversationSelector.js +4 -0
- package/dist/cli/loop/session.js +27 -15
- package/dist/lib/providers/googleVertex.js +13 -5
- package/dist/providers/googleVertex.js +13 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [8.3.0](https://github.com/juspay/neurolink/compare/v8.2.0...v8.3.0) (2025-11-28)
|
|
2
|
+
|
|
3
|
+
### Features
|
|
4
|
+
|
|
5
|
+
- **(cli):** make stream the default command in loop mode ([7aeb1d7](https://github.com/juspay/neurolink/commit/7aeb1d790e1b103b5fc1889e21431e9c7b9dcf5f))
|
|
6
|
+
|
|
7
|
+
## [8.2.0](https://github.com/juspay/neurolink/compare/v8.1.0...v8.2.0) (2025-11-25)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- **(vertex):** add global endpoint support for Gemini 3 Pro Preview ([5de2cbe](https://github.com/juspay/neurolink/commit/5de2cbe3f37ef3355f5d506c03ae4417f430724c))
|
|
12
|
+
|
|
1
13
|
## [8.1.0](https://github.com/juspay/neurolink/compare/v8.0.1...v8.1.0) (2025-11-20)
|
|
2
14
|
|
|
3
15
|
### Features
|
package/README.md
CHANGED
|
@@ -211,15 +211,24 @@ npx @juspay/neurolink loop
|
|
|
211
211
|
# Start the interactive session
|
|
212
212
|
$ npx @juspay/neurolink loop
|
|
213
213
|
|
|
214
|
-
neurolink » set provider google-ai
|
|
214
|
+
neurolink » /set provider google-ai
|
|
215
215
|
✓ provider set to google-ai
|
|
216
216
|
|
|
217
|
-
neurolink » set temperature 0.8
|
|
217
|
+
neurolink » /set temperature 0.8
|
|
218
218
|
✓ temperature set to 0.8
|
|
219
219
|
|
|
220
|
-
neurolink »
|
|
220
|
+
neurolink » Tell me a fun fact about space
|
|
221
|
+
|
|
221
222
|
The quietest place on Earth is an anechoic chamber at Microsoft's headquarters in Redmond, Washington. The background noise is so low that it's measured in negative decibels, and you can hear your own heartbeat.
|
|
222
223
|
|
|
224
|
+
# Use "/" for CLI commands
|
|
225
|
+
neurolink » /generate "Draft a haiku"
|
|
226
|
+
...
|
|
227
|
+
|
|
228
|
+
# Use "//" to escape prompts starting with "/"
|
|
229
|
+
neurolink » //what is /usr/bin used for?
|
|
230
|
+
...
|
|
231
|
+
|
|
223
232
|
# Exit the session
|
|
224
233
|
neurolink » exit
|
|
225
234
|
```
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Method 3: Individual Vars (GOOGLE_AUTH_CLIENT_EMAIL + GOOGLE_AUTH_PRIVATE_KEY)
|
|
9
9
|
*
|
|
10
10
|
* All methods require GOOGLE_VERTEX_PROJECT
|
|
11
|
-
* Optional: GOOGLE_VERTEX_LOCATION (defaults to 'us-
|
|
11
|
+
* Optional: GOOGLE_VERTEX_LOCATION (defaults to 'us-central1')
|
|
12
12
|
*/
|
|
13
13
|
interface GCPSetupArgv {
|
|
14
14
|
check?: boolean;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Method 3: Individual Vars (GOOGLE_AUTH_CLIENT_EMAIL + GOOGLE_AUTH_PRIVATE_KEY)
|
|
9
9
|
*
|
|
10
10
|
* All methods require GOOGLE_VERTEX_PROJECT
|
|
11
|
-
* Optional: GOOGLE_VERTEX_LOCATION (defaults to 'us-
|
|
11
|
+
* Optional: GOOGLE_VERTEX_LOCATION (defaults to 'us-central1')
|
|
12
12
|
*/
|
|
13
13
|
import fs from "fs";
|
|
14
14
|
import path from "path";
|
|
@@ -52,7 +52,7 @@ export async function handleGCPSetup(argv) {
|
|
|
52
52
|
logger.always(` Location: ${process.env.GOOGLE_VERTEX_LOCATION}`);
|
|
53
53
|
}
|
|
54
54
|
else {
|
|
55
|
-
logger.always(` Location: us-
|
|
55
|
+
logger.always(` Location: us-central1 (default)`);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
return;
|
|
@@ -70,7 +70,7 @@ export async function handleGCPSetup(argv) {
|
|
|
70
70
|
logger.always(` Location: ${process.env.GOOGLE_VERTEX_LOCATION}`);
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
|
-
logger.always(` Location: us-
|
|
73
|
+
logger.always(` Location: us-central1 (default)`);
|
|
74
74
|
}
|
|
75
75
|
const { reconfigure } = await inquirer.prompt([
|
|
76
76
|
{
|
|
@@ -100,7 +100,7 @@ export async function handleGCPSetup(argv) {
|
|
|
100
100
|
// Step 8: Success message
|
|
101
101
|
logger.always(chalk.green(`✅ Google Vertex setup complete with ${AUTH_METHOD_NAMES[selectedMethod]}`));
|
|
102
102
|
logger.always(` Project: ${config.project}`);
|
|
103
|
-
logger.always(` Location: ${config.location || "us-
|
|
103
|
+
logger.always(` Location: ${config.location || "us-central1"}`);
|
|
104
104
|
}
|
|
105
105
|
catch (error) {
|
|
106
106
|
logger.error(chalk.red("❌ GCP setup failed:"));
|
|
@@ -411,8 +411,8 @@ async function promptForMissingValues(method, status) {
|
|
|
411
411
|
{
|
|
412
412
|
type: "input",
|
|
413
413
|
name: "location",
|
|
414
|
-
message: "Enter your Google Vertex AI location:",
|
|
415
|
-
default: "us-
|
|
414
|
+
message: "Enter your Google Vertex AI location (or 'global' for global endpoint):",
|
|
415
|
+
default: "us-central1",
|
|
416
416
|
validate: (input) => {
|
|
417
417
|
if (!input.trim()) {
|
|
418
418
|
return "Location is required";
|
|
@@ -121,6 +121,10 @@ export class ConversationSelector {
|
|
|
121
121
|
if (conversation &&
|
|
122
122
|
conversation.messages &&
|
|
123
123
|
conversation.messages.length > 0) {
|
|
124
|
+
// Only include conversations with session IDs prefixed with "NL_"
|
|
125
|
+
if (!conversation.sessionId?.startsWith("NL_")) {
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
124
128
|
return this.createConversationSummary(conversation);
|
|
125
129
|
}
|
|
126
130
|
return null;
|
package/dist/cli/loop/session.js
CHANGED
|
@@ -81,14 +81,31 @@ export class LoopSession {
|
|
|
81
81
|
if (!command) {
|
|
82
82
|
continue;
|
|
83
83
|
}
|
|
84
|
-
//
|
|
85
|
-
if (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
// Save command to history
|
|
85
|
+
if (command && command.trim()) {
|
|
86
|
+
this.commandHistory.unshift(command);
|
|
87
|
+
await saveCommandToHistory(command);
|
|
88
|
+
}
|
|
89
|
+
let processedCommand;
|
|
90
|
+
if (command.startsWith("//")) {
|
|
91
|
+
// Escape sequence - treat as stream with single /
|
|
92
|
+
processedCommand = ["stream", command.slice(1)];
|
|
93
|
+
}
|
|
94
|
+
else if (command.startsWith("/")) {
|
|
95
|
+
// Explicit CLI command: remove "/" prefix
|
|
96
|
+
processedCommand = command.slice(1).trim();
|
|
97
|
+
if (!processedCommand) {
|
|
98
|
+
logger.always(chalk.red("Type 'help' for available commands."));
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
// Handle session variable commands and skip further processing
|
|
102
|
+
if (await this.handleSessionCommands(processedCommand)) {
|
|
103
|
+
continue;
|
|
90
104
|
}
|
|
91
|
-
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
// Default: treat as stream command with array format
|
|
108
|
+
processedCommand = ["stream", command];
|
|
92
109
|
}
|
|
93
110
|
// Execute the command
|
|
94
111
|
// The .fail() handler in cli.ts is now session-aware and will
|
|
@@ -102,16 +119,11 @@ export class LoopSession {
|
|
|
102
119
|
throw err || new Error(msg);
|
|
103
120
|
})
|
|
104
121
|
.exitProcess(false)
|
|
105
|
-
.parse(
|
|
106
|
-
// Save command to history (both memory and file)
|
|
107
|
-
if (command && command.trim()) {
|
|
108
|
-
this.commandHistory.unshift(command);
|
|
109
|
-
await saveCommandToHistory(command);
|
|
110
|
-
}
|
|
122
|
+
.parse(processedCommand);
|
|
111
123
|
}
|
|
112
124
|
catch (error) {
|
|
113
|
-
//
|
|
114
|
-
handleError(error, "
|
|
125
|
+
// Handle command execution errors gracefully
|
|
126
|
+
handleError(error, "Command execution failed");
|
|
115
127
|
}
|
|
116
128
|
}
|
|
117
129
|
// Cleanup on exit
|
|
@@ -49,11 +49,19 @@ const hasGoogleCredentials = () => {
|
|
|
49
49
|
};
|
|
50
50
|
// Enhanced Vertex settings creation with authentication fallback and proxy support
|
|
51
51
|
const createVertexSettings = async (region) => {
|
|
52
|
+
const location = region || getVertexLocation();
|
|
53
|
+
const project = getVertexProjectId();
|
|
52
54
|
const baseSettings = {
|
|
53
|
-
project
|
|
54
|
-
location
|
|
55
|
+
project,
|
|
56
|
+
location,
|
|
55
57
|
fetch: createProxyFetch(),
|
|
56
58
|
};
|
|
59
|
+
// Special handling for global endpoint
|
|
60
|
+
// Google's global endpoint uses aiplatform.googleapis.com (no region prefix)
|
|
61
|
+
// instead of {region}-aiplatform.googleapis.com
|
|
62
|
+
if (location === "global") {
|
|
63
|
+
baseSettings.baseURL = `https://aiplatform.googleapis.com/v1/projects/${project}/locations/global/publishers/google`;
|
|
64
|
+
}
|
|
57
65
|
// 🎯 OPTION 2: Create credentials file from environment variables at runtime
|
|
58
66
|
// This solves the problem where GOOGLE_APPLICATION_CREDENTIALS exists in ZSHRC locally
|
|
59
67
|
// but the file doesn't exist on production servers
|
|
@@ -1136,10 +1144,10 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
1136
1144
|
process.env.GOOGLE_VERTEX_LOCATION ||
|
|
1137
1145
|
"us-central1";
|
|
1138
1146
|
result.region = region;
|
|
1139
|
-
// Validate region format
|
|
1140
|
-
const regionPattern = /^[a-z]+-[a-z]+\d
|
|
1147
|
+
// Validate region format (regional format like us-central1 or global endpoint)
|
|
1148
|
+
const regionPattern = /^([a-z]+-[a-z]+\d+|global)$/;
|
|
1141
1149
|
if (!regionPattern.test(region)) {
|
|
1142
|
-
result.issues.push(`Invalid region format: ${region}`);
|
|
1150
|
+
result.issues.push(`Invalid region format: ${region} (expected format: 'us-central1' or 'global')`);
|
|
1143
1151
|
result.isValid = false;
|
|
1144
1152
|
}
|
|
1145
1153
|
return result;
|
|
@@ -49,11 +49,19 @@ const hasGoogleCredentials = () => {
|
|
|
49
49
|
};
|
|
50
50
|
// Enhanced Vertex settings creation with authentication fallback and proxy support
|
|
51
51
|
const createVertexSettings = async (region) => {
|
|
52
|
+
const location = region || getVertexLocation();
|
|
53
|
+
const project = getVertexProjectId();
|
|
52
54
|
const baseSettings = {
|
|
53
|
-
project
|
|
54
|
-
location
|
|
55
|
+
project,
|
|
56
|
+
location,
|
|
55
57
|
fetch: createProxyFetch(),
|
|
56
58
|
};
|
|
59
|
+
// Special handling for global endpoint
|
|
60
|
+
// Google's global endpoint uses aiplatform.googleapis.com (no region prefix)
|
|
61
|
+
// instead of {region}-aiplatform.googleapis.com
|
|
62
|
+
if (location === "global") {
|
|
63
|
+
baseSettings.baseURL = `https://aiplatform.googleapis.com/v1/projects/${project}/locations/global/publishers/google`;
|
|
64
|
+
}
|
|
57
65
|
// 🎯 OPTION 2: Create credentials file from environment variables at runtime
|
|
58
66
|
// This solves the problem where GOOGLE_APPLICATION_CREDENTIALS exists in ZSHRC locally
|
|
59
67
|
// but the file doesn't exist on production servers
|
|
@@ -1136,10 +1144,10 @@ export class GoogleVertexProvider extends BaseProvider {
|
|
|
1136
1144
|
process.env.GOOGLE_VERTEX_LOCATION ||
|
|
1137
1145
|
"us-central1";
|
|
1138
1146
|
result.region = region;
|
|
1139
|
-
// Validate region format
|
|
1140
|
-
const regionPattern = /^[a-z]+-[a-z]+\d
|
|
1147
|
+
// Validate region format (regional format like us-central1 or global endpoint)
|
|
1148
|
+
const regionPattern = /^([a-z]+-[a-z]+\d+|global)$/;
|
|
1141
1149
|
if (!regionPattern.test(region)) {
|
|
1142
|
-
result.issues.push(`Invalid region format: ${region}`);
|
|
1150
|
+
result.issues.push(`Invalid region format: ${region} (expected format: 'us-central1' or 'global')`);
|
|
1143
1151
|
result.isValid = false;
|
|
1144
1152
|
}
|
|
1145
1153
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.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",
|