@juspay/neurolink 7.7.0 → 7.7.1
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,9 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
## [7.7.1](https://github.com/juspay/neurolink/compare/v7.7.0...v7.7.1) (2025-08-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **providers:** resolve ESLint errors and improve validation in Vertex AI health checker ([a5822ee](https://github.com/juspay/neurolink/commit/a5822eee3f8b6beaf3d2168ebb8888a6beaa5cb4))
|
|
2
7
|
|
|
8
|
+
# [7.7.0](https://github.com/juspay/neurolink/compare/v7.6.1...v7.7.0) (2025-08-10)
|
|
3
9
|
|
|
4
10
|
### Features
|
|
5
11
|
|
|
6
|
-
|
|
12
|
+
- **tools:** add Lighthouse compatibility with unified registerTools API ([5200da2](https://github.com/juspay/neurolink/commit/5200da22b130b57c6b235346bd9db80970703900))
|
|
7
13
|
|
|
8
14
|
## [7.6.1](https://github.com/juspay/neurolink/compare/v7.6.0...v7.6.1) (2025-08-09)
|
|
9
15
|
|
|
@@ -308,7 +308,11 @@ export function createVertexProjectConfig() {
|
|
|
308
308
|
"3. Enable Vertex AI API",
|
|
309
309
|
"4. Set up authentication",
|
|
310
310
|
],
|
|
311
|
-
fallbackEnvVars: [
|
|
311
|
+
fallbackEnvVars: [
|
|
312
|
+
"VERTEX_PROJECT_ID",
|
|
313
|
+
"GOOGLE_VERTEX_PROJECT",
|
|
314
|
+
"GOOGLE_CLOUD_PROJECT",
|
|
315
|
+
],
|
|
312
316
|
};
|
|
313
317
|
}
|
|
314
318
|
/**
|
|
@@ -331,7 +335,7 @@ export function createGoogleAuthConfig() {
|
|
|
331
335
|
"GOOGLE_AUTH_CLIENT_EMAIL=your-service-account@project.iam.gserviceaccount.com",
|
|
332
336
|
"GOOGLE_AUTH_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----...",
|
|
333
337
|
],
|
|
334
|
-
fallbackEnvVars: ["GOOGLE_SERVICE_ACCOUNT_KEY"
|
|
338
|
+
fallbackEnvVars: ["GOOGLE_SERVICE_ACCOUNT_KEY"],
|
|
335
339
|
};
|
|
336
340
|
}
|
|
337
341
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { logger } from "./logger.js";
|
|
6
6
|
import { AIProviderName } from "../core/types.js";
|
|
7
|
+
import { basename } from "path";
|
|
7
8
|
export class ProviderHealthChecker {
|
|
8
9
|
static healthCache = new Map();
|
|
9
10
|
static DEFAULT_TIMEOUT = 5000; // 5 seconds
|
|
@@ -245,7 +246,11 @@ export class ProviderHealthChecker {
|
|
|
245
246
|
case AIProviderName.OPENAI:
|
|
246
247
|
return ["OPENAI_API_KEY"];
|
|
247
248
|
case AIProviderName.VERTEX:
|
|
248
|
-
|
|
249
|
+
// Vertex AI requires authentication, but not via a single environment variable.
|
|
250
|
+
// Authentication can be provided via a credential file or individual credentials + project.
|
|
251
|
+
// The required authentication is checked in checkProviderSpecificConfig instead of here.
|
|
252
|
+
// Returning an empty array here does NOT mean authentication is not required.
|
|
253
|
+
return [];
|
|
249
254
|
case AIProviderName.GOOGLE_AI:
|
|
250
255
|
return ["GOOGLE_AI_API_KEY"];
|
|
251
256
|
case AIProviderName.BEDROCK:
|
|
@@ -324,20 +329,51 @@ export class ProviderHealthChecker {
|
|
|
324
329
|
*/
|
|
325
330
|
static async checkProviderSpecificConfig(providerName, healthStatus) {
|
|
326
331
|
switch (providerName) {
|
|
327
|
-
case AIProviderName.VERTEX:
|
|
328
|
-
// Check for Google Cloud
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
+
case AIProviderName.VERTEX: {
|
|
333
|
+
// Check for Google Cloud project ID (with fallbacks)
|
|
334
|
+
const projectId = process.env.GOOGLE_PROJECT_ID ||
|
|
335
|
+
process.env.GOOGLE_CLOUD_PROJECT_ID ||
|
|
336
|
+
process.env.GOOGLE_VERTEX_PROJECT ||
|
|
337
|
+
process.env.GOOGLE_CLOUD_PROJECT ||
|
|
338
|
+
process.env.VERTEX_PROJECT_ID;
|
|
339
|
+
if (!projectId) {
|
|
340
|
+
healthStatus.configurationIssues.push("Google Cloud project ID not set");
|
|
341
|
+
healthStatus.recommendations.push("Set one of: GOOGLE_VERTEX_PROJECT, GOOGLE_CLOUD_PROJECT_ID, GOOGLE_PROJECT_ID, or GOOGLE_CLOUD_PROJECT");
|
|
342
|
+
}
|
|
343
|
+
// Check for authentication (either credentials file OR individual credentials)
|
|
344
|
+
const hasCredentialsFile = !!process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
345
|
+
const hasServiceAccountKey = !!process.env.GOOGLE_SERVICE_ACCOUNT_KEY;
|
|
346
|
+
const hasIndividualCredentials = !!(process.env.GOOGLE_AUTH_CLIENT_EMAIL &&
|
|
347
|
+
process.env.GOOGLE_AUTH_PRIVATE_KEY);
|
|
348
|
+
if (!hasCredentialsFile &&
|
|
349
|
+
!hasServiceAccountKey &&
|
|
350
|
+
!hasIndividualCredentials) {
|
|
351
|
+
healthStatus.configurationIssues.push("Google Cloud authentication not configured");
|
|
352
|
+
healthStatus.recommendations.push("Set either GOOGLE_APPLICATION_CREDENTIALS (file path), GOOGLE_SERVICE_ACCOUNT_KEY (base64), or both GOOGLE_AUTH_CLIENT_EMAIL and GOOGLE_AUTH_PRIVATE_KEY");
|
|
332
353
|
}
|
|
333
|
-
{
|
|
354
|
+
else {
|
|
355
|
+
healthStatus.hasApiKey = true; // At least one auth method is configured
|
|
356
|
+
}
|
|
357
|
+
// Validate credentials file if provided
|
|
358
|
+
if (hasCredentialsFile) {
|
|
334
359
|
const credPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
335
|
-
|
|
360
|
+
const fileName = basename(credPath);
|
|
361
|
+
// Use regex to match .json files with optional backup extensions
|
|
362
|
+
const jsonFilePattern = /\.json(\.\w+)?$/;
|
|
363
|
+
if (!jsonFilePattern.test(fileName)) {
|
|
336
364
|
healthStatus.warning =
|
|
337
|
-
"GOOGLE_APPLICATION_CREDENTIALS should point to a JSON file";
|
|
365
|
+
"GOOGLE_APPLICATION_CREDENTIALS should point to a JSON file (e.g., 'credentials.json' or 'key.json.backup')";
|
|
338
366
|
}
|
|
339
367
|
}
|
|
368
|
+
// Mark as configured if we have both project ID and auth
|
|
369
|
+
if (projectId &&
|
|
370
|
+
(hasCredentialsFile ||
|
|
371
|
+
hasServiceAccountKey ||
|
|
372
|
+
hasIndividualCredentials)) {
|
|
373
|
+
healthStatus.isConfigured = true;
|
|
374
|
+
}
|
|
340
375
|
break;
|
|
376
|
+
}
|
|
341
377
|
case AIProviderName.BEDROCK:
|
|
342
378
|
// Check AWS region
|
|
343
379
|
if (!process.env.AWS_REGION) {
|
|
@@ -308,7 +308,11 @@ export function createVertexProjectConfig() {
|
|
|
308
308
|
"3. Enable Vertex AI API",
|
|
309
309
|
"4. Set up authentication",
|
|
310
310
|
],
|
|
311
|
-
fallbackEnvVars: [
|
|
311
|
+
fallbackEnvVars: [
|
|
312
|
+
"VERTEX_PROJECT_ID",
|
|
313
|
+
"GOOGLE_VERTEX_PROJECT",
|
|
314
|
+
"GOOGLE_CLOUD_PROJECT",
|
|
315
|
+
],
|
|
312
316
|
};
|
|
313
317
|
}
|
|
314
318
|
/**
|
|
@@ -331,7 +335,7 @@ export function createGoogleAuthConfig() {
|
|
|
331
335
|
"GOOGLE_AUTH_CLIENT_EMAIL=your-service-account@project.iam.gserviceaccount.com",
|
|
332
336
|
"GOOGLE_AUTH_PRIVATE_KEY=-----BEGIN PRIVATE KEY-----...",
|
|
333
337
|
],
|
|
334
|
-
fallbackEnvVars: ["GOOGLE_SERVICE_ACCOUNT_KEY"
|
|
338
|
+
fallbackEnvVars: ["GOOGLE_SERVICE_ACCOUNT_KEY"],
|
|
335
339
|
};
|
|
336
340
|
}
|
|
337
341
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { logger } from "./logger.js";
|
|
6
6
|
import { AIProviderName } from "../core/types.js";
|
|
7
|
+
import { basename } from "path";
|
|
7
8
|
export class ProviderHealthChecker {
|
|
8
9
|
static healthCache = new Map();
|
|
9
10
|
static DEFAULT_TIMEOUT = 5000; // 5 seconds
|
|
@@ -245,7 +246,11 @@ export class ProviderHealthChecker {
|
|
|
245
246
|
case AIProviderName.OPENAI:
|
|
246
247
|
return ["OPENAI_API_KEY"];
|
|
247
248
|
case AIProviderName.VERTEX:
|
|
248
|
-
|
|
249
|
+
// Vertex AI requires authentication, but not via a single environment variable.
|
|
250
|
+
// Authentication can be provided via a credential file or individual credentials + project.
|
|
251
|
+
// The required authentication is checked in checkProviderSpecificConfig instead of here.
|
|
252
|
+
// Returning an empty array here does NOT mean authentication is not required.
|
|
253
|
+
return [];
|
|
249
254
|
case AIProviderName.GOOGLE_AI:
|
|
250
255
|
return ["GOOGLE_AI_API_KEY"];
|
|
251
256
|
case AIProviderName.BEDROCK:
|
|
@@ -324,20 +329,51 @@ export class ProviderHealthChecker {
|
|
|
324
329
|
*/
|
|
325
330
|
static async checkProviderSpecificConfig(providerName, healthStatus) {
|
|
326
331
|
switch (providerName) {
|
|
327
|
-
case AIProviderName.VERTEX:
|
|
328
|
-
// Check for Google Cloud
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
+
case AIProviderName.VERTEX: {
|
|
333
|
+
// Check for Google Cloud project ID (with fallbacks)
|
|
334
|
+
const projectId = process.env.GOOGLE_PROJECT_ID ||
|
|
335
|
+
process.env.GOOGLE_CLOUD_PROJECT_ID ||
|
|
336
|
+
process.env.GOOGLE_VERTEX_PROJECT ||
|
|
337
|
+
process.env.GOOGLE_CLOUD_PROJECT ||
|
|
338
|
+
process.env.VERTEX_PROJECT_ID;
|
|
339
|
+
if (!projectId) {
|
|
340
|
+
healthStatus.configurationIssues.push("Google Cloud project ID not set");
|
|
341
|
+
healthStatus.recommendations.push("Set one of: GOOGLE_VERTEX_PROJECT, GOOGLE_CLOUD_PROJECT_ID, GOOGLE_PROJECT_ID, or GOOGLE_CLOUD_PROJECT");
|
|
342
|
+
}
|
|
343
|
+
// Check for authentication (either credentials file OR individual credentials)
|
|
344
|
+
const hasCredentialsFile = !!process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
345
|
+
const hasServiceAccountKey = !!process.env.GOOGLE_SERVICE_ACCOUNT_KEY;
|
|
346
|
+
const hasIndividualCredentials = !!(process.env.GOOGLE_AUTH_CLIENT_EMAIL &&
|
|
347
|
+
process.env.GOOGLE_AUTH_PRIVATE_KEY);
|
|
348
|
+
if (!hasCredentialsFile &&
|
|
349
|
+
!hasServiceAccountKey &&
|
|
350
|
+
!hasIndividualCredentials) {
|
|
351
|
+
healthStatus.configurationIssues.push("Google Cloud authentication not configured");
|
|
352
|
+
healthStatus.recommendations.push("Set either GOOGLE_APPLICATION_CREDENTIALS (file path), GOOGLE_SERVICE_ACCOUNT_KEY (base64), or both GOOGLE_AUTH_CLIENT_EMAIL and GOOGLE_AUTH_PRIVATE_KEY");
|
|
332
353
|
}
|
|
333
|
-
{
|
|
354
|
+
else {
|
|
355
|
+
healthStatus.hasApiKey = true; // At least one auth method is configured
|
|
356
|
+
}
|
|
357
|
+
// Validate credentials file if provided
|
|
358
|
+
if (hasCredentialsFile) {
|
|
334
359
|
const credPath = process.env.GOOGLE_APPLICATION_CREDENTIALS;
|
|
335
|
-
|
|
360
|
+
const fileName = basename(credPath);
|
|
361
|
+
// Use regex to match .json files with optional backup extensions
|
|
362
|
+
const jsonFilePattern = /\.json(\.\w+)?$/;
|
|
363
|
+
if (!jsonFilePattern.test(fileName)) {
|
|
336
364
|
healthStatus.warning =
|
|
337
|
-
"GOOGLE_APPLICATION_CREDENTIALS should point to a JSON file";
|
|
365
|
+
"GOOGLE_APPLICATION_CREDENTIALS should point to a JSON file (e.g., 'credentials.json' or 'key.json.backup')";
|
|
338
366
|
}
|
|
339
367
|
}
|
|
368
|
+
// Mark as configured if we have both project ID and auth
|
|
369
|
+
if (projectId &&
|
|
370
|
+
(hasCredentialsFile ||
|
|
371
|
+
hasServiceAccountKey ||
|
|
372
|
+
hasIndividualCredentials)) {
|
|
373
|
+
healthStatus.isConfigured = true;
|
|
374
|
+
}
|
|
340
375
|
break;
|
|
376
|
+
}
|
|
341
377
|
case AIProviderName.BEDROCK:
|
|
342
378
|
// Check AWS region
|
|
343
379
|
if (!process.env.AWS_REGION) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.1",
|
|
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",
|