@juspay/neurolink 8.26.0 → 8.26.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 +6 -0
- package/README.md +47 -25
- package/dist/adapters/providerImageAdapter.js +11 -0
- package/dist/cli/commands/config.js +16 -23
- package/dist/cli/commands/setup-anthropic.js +3 -26
- package/dist/cli/commands/setup-azure.js +3 -22
- package/dist/cli/commands/setup-bedrock.js +3 -26
- package/dist/cli/commands/setup-google-ai.js +3 -22
- package/dist/cli/commands/setup-mistral.js +3 -31
- package/dist/cli/commands/setup-openai.js +3 -22
- package/dist/cli/factories/commandFactory.js +32 -0
- package/dist/cli/factories/ollamaCommandFactory.js +5 -17
- package/dist/cli/loop/optionsSchema.d.ts +1 -1
- package/dist/cli/loop/optionsSchema.js +13 -0
- package/dist/config/modelSpecificPrompts.d.ts +9 -0
- package/dist/config/modelSpecificPrompts.js +38 -0
- package/dist/constants/enums.d.ts +8 -0
- package/dist/constants/enums.js +8 -0
- package/dist/constants/tokens.d.ts +25 -0
- package/dist/constants/tokens.js +18 -0
- package/dist/core/analytics.js +7 -28
- package/dist/core/baseProvider.js +1 -0
- package/dist/core/constants.d.ts +1 -0
- package/dist/core/constants.js +1 -0
- package/dist/core/modules/GenerationHandler.js +43 -5
- package/dist/core/streamAnalytics.d.ts +1 -0
- package/dist/core/streamAnalytics.js +8 -16
- package/dist/lib/adapters/providerImageAdapter.js +11 -0
- package/dist/lib/config/modelSpecificPrompts.d.ts +9 -0
- package/dist/lib/config/modelSpecificPrompts.js +39 -0
- package/dist/lib/constants/enums.d.ts +8 -0
- package/dist/lib/constants/enums.js +8 -0
- package/dist/lib/constants/tokens.d.ts +25 -0
- package/dist/lib/constants/tokens.js +18 -0
- package/dist/lib/core/analytics.js +7 -28
- package/dist/lib/core/baseProvider.js +1 -0
- package/dist/lib/core/constants.d.ts +1 -0
- package/dist/lib/core/constants.js +1 -0
- package/dist/lib/core/modules/GenerationHandler.js +43 -5
- package/dist/lib/core/streamAnalytics.d.ts +1 -0
- package/dist/lib/core/streamAnalytics.js +8 -16
- package/dist/lib/providers/googleAiStudio.d.ts +15 -0
- package/dist/lib/providers/googleAiStudio.js +659 -3
- package/dist/lib/providers/googleVertex.d.ts +25 -0
- package/dist/lib/providers/googleVertex.js +978 -3
- package/dist/lib/types/analytics.d.ts +4 -0
- package/dist/lib/types/cli.d.ts +16 -0
- package/dist/lib/types/conversation.d.ts +72 -4
- package/dist/lib/types/conversation.js +30 -0
- package/dist/lib/types/generateTypes.d.ts +135 -0
- package/dist/lib/types/groundingTypes.d.ts +231 -0
- package/dist/lib/types/groundingTypes.js +12 -0
- package/dist/lib/types/providers.d.ts +29 -0
- package/dist/lib/types/streamTypes.d.ts +54 -0
- package/dist/lib/utils/analyticsUtils.js +22 -2
- package/dist/lib/utils/modelChoices.d.ts +82 -0
- package/dist/lib/utils/modelChoices.js +402 -0
- package/dist/lib/utils/modelDetection.d.ts +9 -0
- package/dist/lib/utils/modelDetection.js +81 -0
- package/dist/lib/utils/schemaConversion.d.ts +12 -0
- package/dist/lib/utils/schemaConversion.js +90 -0
- package/dist/lib/utils/thinkingConfig.d.ts +108 -0
- package/dist/lib/utils/thinkingConfig.js +105 -0
- package/dist/lib/utils/tokenUtils.d.ts +124 -0
- package/dist/lib/utils/tokenUtils.js +240 -0
- package/dist/lib/utils/transformationUtils.js +15 -26
- package/dist/providers/googleAiStudio.d.ts +15 -0
- package/dist/providers/googleAiStudio.js +659 -3
- package/dist/providers/googleVertex.d.ts +25 -0
- package/dist/providers/googleVertex.js +978 -3
- package/dist/types/analytics.d.ts +4 -0
- package/dist/types/cli.d.ts +16 -0
- package/dist/types/conversation.d.ts +72 -4
- package/dist/types/conversation.js +30 -0
- package/dist/types/generateTypes.d.ts +135 -0
- package/dist/types/groundingTypes.d.ts +231 -0
- package/dist/types/groundingTypes.js +11 -0
- package/dist/types/providers.d.ts +29 -0
- package/dist/types/streamTypes.d.ts +54 -0
- package/dist/utils/analyticsUtils.js +22 -2
- package/dist/utils/modelChoices.d.ts +82 -0
- package/dist/utils/modelChoices.js +401 -0
- package/dist/utils/modelDetection.d.ts +9 -0
- package/dist/utils/modelDetection.js +80 -0
- package/dist/utils/schemaConversion.d.ts +12 -0
- package/dist/utils/schemaConversion.js +90 -0
- package/dist/utils/thinkingConfig.d.ts +108 -0
- package/dist/utils/thinkingConfig.js +104 -0
- package/dist/utils/tokenUtils.d.ts +124 -0
- package/dist/utils/tokenUtils.js +239 -0
- package/dist/utils/transformationUtils.js +15 -26
- package/package.json +4 -3
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Centralizes repeated object transformation patterns to improve code reuse and maintainability
|
|
4
4
|
*/
|
|
5
5
|
import { logger } from "./logger.js";
|
|
6
|
+
import { inlineJsonSchema } from "./schemaConversion.js";
|
|
6
7
|
// ============================================================================
|
|
7
8
|
// TOOL EXECUTION TRANSFORMATIONS
|
|
8
9
|
// ============================================================================
|
|
@@ -262,42 +263,30 @@ export function transformAvailableTools(availableTools) {
|
|
|
262
263
|
const directParameters = toolRecord.parameters;
|
|
263
264
|
const fallbackSchema = toolRecord.schema;
|
|
264
265
|
if (inputSchema && typeof inputSchema === "object") {
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
if (typeof refValue === "string") {
|
|
269
|
-
const refKey = refValue.replace("#/definitions/", "");
|
|
270
|
-
if (definitions[refKey] && typeof definitions[refKey] === "object") {
|
|
271
|
-
const resolvedSchema = definitions[refKey];
|
|
272
|
-
extractedParameters = {
|
|
273
|
-
type: resolvedSchema.type || "object",
|
|
274
|
-
properties: resolvedSchema.properties || {},
|
|
275
|
-
required: resolvedSchema.required || [],
|
|
276
|
-
...resolvedSchema, // Include all schema metadata
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
else if (inputSchema.properties) {
|
|
266
|
+
// Use shared inlineJsonSchema for recursive $ref resolution
|
|
267
|
+
const inlinedSchema = inlineJsonSchema(inputSchema);
|
|
268
|
+
if (inlinedSchema.properties) {
|
|
282
269
|
extractedParameters = {
|
|
283
|
-
type:
|
|
284
|
-
properties:
|
|
285
|
-
required:
|
|
286
|
-
...
|
|
270
|
+
type: inlinedSchema.type || "object",
|
|
271
|
+
properties: inlinedSchema.properties,
|
|
272
|
+
required: inlinedSchema.required || [],
|
|
273
|
+
...inlinedSchema,
|
|
287
274
|
};
|
|
288
275
|
}
|
|
289
|
-
else if (
|
|
290
|
-
extractedParameters =
|
|
276
|
+
else if (inlinedSchema.type === "object") {
|
|
277
|
+
extractedParameters = inlinedSchema;
|
|
291
278
|
}
|
|
292
279
|
else {
|
|
293
|
-
extractedParameters =
|
|
280
|
+
extractedParameters = inlinedSchema;
|
|
294
281
|
}
|
|
295
282
|
}
|
|
296
283
|
else if (directParameters && typeof directParameters === "object") {
|
|
297
|
-
|
|
284
|
+
// Also inline $ref for direct parameters if present
|
|
285
|
+
extractedParameters = inlineJsonSchema(directParameters);
|
|
298
286
|
}
|
|
299
287
|
else if (fallbackSchema && typeof fallbackSchema === "object") {
|
|
300
|
-
|
|
288
|
+
// Also inline $ref for fallback schema if present
|
|
289
|
+
extractedParameters = inlineJsonSchema(fallbackSchema);
|
|
301
290
|
}
|
|
302
291
|
if (!extractedParameters || typeof extractedParameters !== "object") {
|
|
303
292
|
extractedParameters = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juspay/neurolink",
|
|
3
|
-
"version": "8.26.
|
|
3
|
+
"version": "8.26.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 13 providers: OpenAI, Anthropic, Google AI, AWS Bedrock, Azure, Hugging Face, Ollama, and Mistral AI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Juspay Technologies",
|
|
@@ -164,9 +164,8 @@
|
|
|
164
164
|
"@aws-sdk/client-sagemaker-runtime": "^3.886.0",
|
|
165
165
|
"@aws-sdk/credential-provider-node": "^3.886.0",
|
|
166
166
|
"@aws-sdk/types": "^3.862.0",
|
|
167
|
-
"@google-cloud/text-to-speech": "^5.0.0",
|
|
168
167
|
"@google-cloud/vertexai": "^1.10.0",
|
|
169
|
-
"@google/genai": "^1.
|
|
168
|
+
"@google/genai": "^1.34.0",
|
|
170
169
|
"@google/generative-ai": "^0.24.1",
|
|
171
170
|
"@huggingface/inference": "^2.8.1",
|
|
172
171
|
"@langfuse/otel": "^4.2.0",
|
|
@@ -215,6 +214,7 @@
|
|
|
215
214
|
"@changesets/changelog-github": "^0.5.1",
|
|
216
215
|
"@changesets/cli": "^2.29.7",
|
|
217
216
|
"@eslint/js": "^9.35.0",
|
|
217
|
+
"@google-cloud/text-to-speech": "^5.0.0",
|
|
218
218
|
"@semantic-release/changelog": "^6.0.3",
|
|
219
219
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
220
220
|
"@semantic-release/git": "^10.0.1",
|
|
@@ -279,6 +279,7 @@
|
|
|
279
279
|
"gpt-4",
|
|
280
280
|
"claude",
|
|
281
281
|
"gemini",
|
|
282
|
+
"gemini-3",
|
|
282
283
|
"ai-sdk",
|
|
283
284
|
"typescript",
|
|
284
285
|
"cli-tool",
|